gchar *utf8_name;
mono_trace (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: creating %s handle, initial %d max %d name \"%s\"",
- __func__, mono_w32handle_ops_typename (MONO_W32HANDLE_NAMEDSEM), initial, max, name);
+ __func__, mono_w32handle_ops_typename (MONO_W32HANDLE_NAMEDSEM), initial, max, (const char*)name);
/* w32 seems to guarantee that opening named objects can't race each other */
mono_w32handle_namespace_lock ();
/* Not an error, but this is how the caller is informed that the semaphore wasn't freshly created */
SetLastError (ERROR_ALREADY_EXISTS);
- /* this is used as creating a new handle */
- mono_w32handle_ref (handle);
+ /* mono_w32handle_namespace_search_handle already adds a ref to the handle */
} else {
/* A new named semaphore */
MonoW32HandleNamedSemaphore namedsem_handle;