mate-desktop / mate-screensaver

MATE screen saver and locker
https://mate-desktop.org
GNU General Public License v2.0
48 stars 40 forks source link

Remove warnings: cast between incompatible function types #220

Closed rbuj closed 4 years ago

rbuj commented 4 years ago

Bump glib-2 required version to 2.58:

gs-manager.c:390:43: warning: cast between incompatible function types from ‘void (*)(void *)’ to ‘void (*)(void *, void *)’ [-Wcast-function-type]
  390 |   g_slist_foreach (manager->priv->themes, (GFunc)g_free, NULL);
      |                                           ^
--
gs-prefs.c:205:35: warning: cast between incompatible function types from ‘void (*)(void *)’ to ‘void (*)(void *, void *)’ [-Wcast-function-type]
  205 |   g_slist_foreach (prefs->themes, (GFunc)g_free, NULL);
      |                                   ^
--
gs-prefs.c:603:35: warning: cast between incompatible function types from ‘void (*)(void *)’ to ‘void (*)(void *, void *)’ [-Wcast-function-type]
  603 |   g_slist_foreach (prefs->themes, (GFunc)g_free, NULL);
      |                                   ^
--
mate-screensaver-preferences.c:810:25: warning: cast between incompatible function types from ‘void (*)(void *)’ to ‘void (*)(void *, void *)’ [-Wcast-function-type]
  810 |  g_list_foreach (files, (GFunc) (g_object_unref), NULL);
      |                         ^
--
copy-theme-dialog.c:437:41: warning: cast between incompatible function types from ‘void (*)(void *)’ to ‘void (*)(void *, void *)’ [-Wcast-function-type]
  437 |  g_slist_foreach (dlg->priv->all_files, (GFunc) (g_object_unref), NULL);
      |                                         ^
copy-theme-dialog.c:439:45: warning: cast between incompatible function types from ‘void (*)(void *)’ to ‘void (*)(void *, void *)’ [-Wcast-function-type]
  439 |  g_slist_foreach (dlg->priv->all_basenames, (GFunc) (g_free), NULL);
      |                                             ^
--
mate-screensaver-dialog.c:348:14: warning: cast between incompatible function types from ‘gboolean (*)(void)’ {aka ‘int (*)(void)’} to ‘gboolean (*)(void *)’ {aka ‘int (*)(void *)’} [-Wcast-function-type]
  348 |   g_idle_add((GSourceFunc) quit_response_ok, NULL);
      |              ^
mate-screensaver-dialog.c:366:15: warning: cast between incompatible function types from ‘gboolean (*)(void)’ {aka ‘int (*)(void)’} to ‘gboolean (*)(void *)’ {aka ‘int (*)(void *)’} [-Wcast-function-type]
  366 |    g_idle_add((GSourceFunc) response_request_quit, NULL);
      |               ^
--
mate-screensaver-dialog.c:598:13: warning: cast between incompatible function types from ‘gboolean (*)(void)’ {aka ‘int (*)(void)’} to ‘gboolean (*)(void *)’ {aka ‘int (*)(void *)’} [-Wcast-function-type]
  598 |  g_idle_add((GSourceFunc) popup_dialog_idle, NULL);
      |             ^
--
gs-lock-plug.c:2144:62: warning: cast between incompatible function types from ‘void (*)(GSLockPlug *)’ to ‘gboolean (*)(void *)’ {aka ‘int (*)(void *)’} [-Wcast-function-type]
 2144 |  plug->priv->datetime_timeout_id = g_timeout_add_seconds (1, (GSourceFunc) date_time_update, plug);
      |                                                              ^
--
gs-auth-pam.c:667:37: warning: cast between incompatible function types from ‘int (*)(int)’ to ‘void * (*)(void *)’ [-Wcast-function-type]
  667 |                                     (GThreadFunc) gs_auth_thread_func,
      |                                     ^