! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
[Patch] Fix 'cast between incompatible function types' warnings
Status:
RESOLVED: MOVED
Product:
Xfce4-power-manager
Component:
General

Comments

Description Sergey Smirnykh 2019-09-01 19:47:20 CEST
Created attachment 8974 
Fixes 'cast between incompatible function types' warnings

This patch fixes the following warnings:

xfpm-dbus-monitor.c: In function ‘xfpm_dbus_monitor_finalize’:
xfpm-dbus-monitor.c:282:54: warning: cast between incompatible function types from ‘void (*)(XfpmWatchData *)’ {aka ‘void (*)(struct <anonymous> *)’} to ‘void (*)(void *, void *)’ [-Wcast-function-type]
  282 |     g_ptr_array_foreach (monitor->priv->names_array, (GFunc) xfpm_dbus_monitor_free_watch_data, NULL);
      |                                                      ^
xfpm-dbus-monitor.c:283:57: warning: cast between incompatible function types from ‘void (*)(XfpmWatchData *)’ {aka ‘void (*)(struct <anonymous> *)’} to ‘void (*)(void *, void *)’ [-Wcast-function-type]
  283 |     g_ptr_array_foreach (monitor->priv->services_array, (GFunc) xfpm_dbus_monitor_free_watch_data, NULL);
      |                                                         ^
xfpm-notify.c: In function ‘xfpm_notify_get_server_caps’:
xfpm-notify.c:97:23: warning: cast between incompatible function types from ‘void (*)(void *)’ to ‘void (*)(void *, void *)’ [-Wcast-function-type]
   97 |  g_list_foreach(caps, (GFunc)g_free, NULL);
      |
Comment 1 Sergey Smirnykh 2019-09-01 19:57:41 CEST
Created attachment 8976 
Fixes 'cast between incompatible function types' warnings

Definitions are static-qualified too now
Comment 2 Git Bot editbugs 2020-05-27 01:46:53 CEST
-- GitLab Migration Automatic Message --

This bug has been migrated to xfce.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.xfce.org/xfce/xfce4-power-manager/-/issues/63.

Please create an account or use an existing account on one of our supported OAuth providers. 

If you want to fork to submit patches and merge requests please continue reading here: https://docs.xfce.org/contribute/dev/git/start#gitlab_forks_and_merge_requests

Also feel free to reach out to us on the mailing list https://mail.xfce.org/mailman/listinfo/xfce4-dev

Bug #15910

Reported by:
Sergey Smirnykh
Reported on: 2019-09-01
Last modified on: 2020-05-27

People

Assignee:
Ali Abdallah
CC List:
3 users

Version

Attachments

Additional information