mate-desktop / mate-settings-daemon

MATE settings daemon
https://mate-desktop.org
GNU General Public License v2.0
44 stars 46 forks source link

Remove warnings about function declaration isn’t a prototype #316

Closed rbuj closed 4 years ago

rbuj commented 4 years ago
< msd-ldsm-trash-empty.c:236:1: warning: function declaration isn’t a prototype [-Wstrict-prototypes]
<   236 | trash_empty_start ()
<       | ^~~~~~~~~~~~~~~~~
< msd-ldsm-trash-empty.c:343:1: warning: function declaration isn’t a prototype [-Wstrict-prototypes]
<   343 | trash_empty_show_confirmation_dialog ()
<       | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

< msd-disk-space.c:587:1: warning: function declaration isn’t a prototype [-Wstrict-prototypes]
<   587 | msd_ldsm_get_config ()
<       | ^~~~~~~~~~~~~~~~~~~

< msd-keyboard-xkb.c:166:1: warning: function declaration isn’t a prototype [-Wstrict-prototypes]
<   166 | popup_menu_launch_capplet ()
<       | ^~~~~~~~~~~~~~~~~~~~~~~~~
< msd-keyboard-xkb.c:198:1: warning: function declaration isn’t a prototype [-Wstrict-prototypes]
<   198 | popup_menu_show_layout ()
<       | ^~~~~~~~~~~~~~~~~~~~~~
< msd-keyboard-xkb.c:333:1: warning: function declaration isn’t a prototype [-Wstrict-prototypes]
<   333 | show_hide_icon ()
<       | ^~~~~~~~~~~~~~
< msd-keyboard-xkb.c:515:1: warning: function declaration isn’t a prototype [-Wstrict-prototypes]
<   515 | msd_keyboard_update_indicator_icons ()
<       | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

< msd-xsettings-manager.c:230:1: warning: function declaration isn’t a prototype [-Wstrict-prototypes]
<   230 | get_window_scale_auto ()
<       | ^~~~~~~~~~~~~~~~~~~~~
sc0w commented 4 years ago

I think there is no sense to fix warnings to come back new warnings (unused parameters)

rbuj commented 4 years ago

@sc0w This type of warning is no longer displayed. I only made git rebase master .

sc0w commented 4 years ago

the warnings are silented, but with this PR we have new unused parameters

this change improves performance?

rbuj commented 4 years ago

@sc0w you can consult this and other warning types at https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html

sc0w commented 4 years ago

you can fix the unused parameters with (void) like you did in https://github.com/mate-desktop/caja/pull/1367

rbuj commented 4 years ago

@sc0w At least, there are two possible solutions, use void for overriding unused arguments, or perform a function cast, like G_SOURCE_FUNC does.

rbuj commented 4 years ago

@sc0w done

rbuj commented 4 years ago

ping