diff --git a/remmina-plugins/nx/nx_plugin.c b/remmina-plugins/nx/nx_plugin.c index 4de7a75bae..a4d2d1ab68 100644 --- a/remmina-plugins/nx/nx_plugin.c +++ b/remmina-plugins/nx/nx_plugin.c @@ -92,9 +92,10 @@ static gboolean onMainThread_cb(struct onMainThread_cb_data *d) } -static void onMainThread_cleanup_handler( struct onMainThread_cb_data *d ) +static void onMainThread_cleanup_handler(gpointer data) { TRACE_CALL("onMainThread_cleanup_handler"); + struct onMainThread_cb_data *d = data; d->cancelled = TRUE; } @@ -103,7 +104,7 @@ static void onMainThread_schedule_callback_and_wait( struct onMainThread_cb_data { TRACE_CALL("onMainThread_schedule_callback_and_wait"); d->cancelled = FALSE; - pthread_cleanup_push( onMainThread_cleanup_handler, (void *)d ); + pthread_cleanup_push( onMainThread_cleanup_handler, d ); pthread_mutex_init( &d->mu, NULL ); pthread_mutex_lock( &d->mu ); gdk_threads_add_idle( (GSourceFunc)onMainThread_cb, (gpointer) d ); diff --git a/remmina-plugins/vnc/vnc_plugin.c b/remmina-plugins/vnc/vnc_plugin.c index f0d41132a5..2001285b10 100644 --- a/remmina-plugins/vnc/vnc_plugin.c +++ b/remmina-plugins/vnc/vnc_plugin.c @@ -174,9 +174,10 @@ static gboolean onMainThread_cb(struct onMainThread_cb_data *d) } -static void onMainThread_cleanup_handler( struct onMainThread_cb_data *d ) +static void onMainThread_cleanup_handler( gpointer data ) { TRACE_CALL("onMainThread_cleanup_handler"); + struct onMainThread_cb_data *d = data; d->cancelled = TRUE; } @@ -185,7 +186,7 @@ static void onMainThread_schedule_callback_and_wait( struct onMainThread_cb_data { TRACE_CALL("onMainThread_schedule_callback_and_wait"); d->cancelled = FALSE; - pthread_cleanup_push( onMainThread_cleanup_handler, (void *)d ); + pthread_cleanup_push( onMainThread_cleanup_handler, d ); pthread_mutex_init( &d->mu, NULL ); pthread_mutex_lock( &d->mu ); gdk_threads_add_idle( (GSourceFunc)onMainThread_cb, (gpointer) d ); diff --git a/remmina/src/remmina_connection_window.c b/remmina/src/remmina_connection_window.c index 9dc8d65b15..6dfcb1ce11 100644 --- a/remmina/src/remmina_connection_window.c +++ b/remmina/src/remmina_connection_window.c @@ -1421,7 +1421,7 @@ static void remmina_connection_holder_toolbar_tools(GtkWidget* widget, RemminaCo RemminaConnectionWindowPriv* priv = cnnhld->cnnwin->priv; const RemminaProtocolFeature* feature; GtkWidget* menu; - GtkWidget* menuitem; + GtkWidget* menuitem = NULL; GtkMenu *submenu_keystrokes; const gchar* domain; gboolean enabled; @@ -1772,9 +1772,9 @@ static void remmina_connection_holder_update_toolbar(RemminaConnectionHolder* cn gtk_window_set_title(GTK_WINDOW(cnnhld->cnnwin), remmina_file_get_string(cnnobj->remmina_file, "name")); #if FLOATING_TOOLBAR_WIDGET - test_floating_toolbar = (priv->floating_toolbar_widget); + test_floating_toolbar = (priv->floating_toolbar_widget != NULL); #else - test_floating_toolbar = (priv->floating_toolbar_window); + test_floating_toolbar = (priv->floating_toolbar_window != NULL); #endif if (test_floating_toolbar) { diff --git a/remmina/src/remmina_masterthread_exec.c b/remmina/src/remmina_masterthread_exec.c index 3f269e7ee4..310ca59ae7 100644 --- a/remmina/src/remmina_masterthread_exec.c +++ b/remmina/src/remmina_masterthread_exec.c @@ -122,8 +122,9 @@ static gboolean remmina_masterthread_exec_callback(RemminaMTExecData *d) return G_SOURCE_REMOVE; } -static void remmina_masterthread_exec_cleanup_handler(RemminaMTExecData *d) +static void remmina_masterthread_exec_cleanup_handler(gpointer data) { + RemminaMTExecData *d = data; d->cancelled = TRUE; }