Skip to content

Fix compiler warnings with GCC 8.1.

John Lindgren requested to merge jlindgren90/gtk:gtk2-gcc-warning-fix into gtk-2-24

GCC 8.1 added some new warnings, including warning about parentheses with no effect in variable declarations. GTK2 headers have a few of these, which produce a lot of warnings in projects using GTK2.

The warnings look like:

/usr/include/gtk-2.0/gtk/gtkfilechooserbutton.h:59:8: warning:
unnecessary parentheses in declaration of ‘__gtk_reserved1’ [-Wparentheses]
   void (*__gtk_reserved1);
        ^

Removing the parentheses is harmless and fixes the warnings.

Edited by John Lindgren

Merge request reports