Wireshark-dev: Re: [Wireshark-dev] GCC GTK3 Wireshark build warnings ?
From: João Valverde <joao.valverde@xxxxxxxxxxxxxxxxxx>
Date: Wed, 11 Nov 2015 17:36:21 +0000


On 11-11-2015 17:28, Bill Meier wrote:
When building GTK3 Wireshark on my Fedora system (after not having done
so for a while), I'm getting many warnings similar to the following:


  CC       libgtkui_a-about_dlg.o
In file included from /usr/include/gtk-3.0/gtk/gtk.h:263:0,
                  from about_dlg.c:28:
/usr/include/gtk-3.0/gtk/deprecated/gtkstyle.h:454:43: error: identifier
"and" is a special operator name in C++ [-Werror=c++-compat]
  GDK_DEPRECATED_IN_3_0_FOR(GtkStyleContext and gtk_render_background)
                                            ^

[versions: Fedora 23; GCC 5.1.1; GTK3 3.18.2]

-Wc++-compat seems to have been added in March 2013 (g557df88), so I
don't know why I'm now getting the warnings (although it's been some
number of months since I've built GTK3 Wireshark with GCC);
  Warnings didn't show with previous versions of GCC compiler ?
  GTK changes ??
  ???


I note that configure.ac has the following code to default to build with
GTK3 in certain cases:

         #
         # No GUI toolkits were explicitly specified; pick Qt
         # and GTK+ 3.
         #
         with_qt=yes
         with_gtk3=yes
     elif test "x$with_gtk2" = "xunspecified" -a \
           "x$with_gtk3" = "xunspecified" -a \
           "x$with_qt" = "xno"; then
         #
         # Qt was explicitly disabled, and neither GTK+ 2 nor
         # GTK+ 3 were explicitly specified; pick GTK+ 3.
         #
         with_gtk3=yes
     fi

So: it seems we want to continue to support GTK3 ?

and thus it seems that the -Wc++-compat compile flag would need to be
removed when building GTK stuff or ??

(I do note that there's been a submission in Gerritt to fix a GDK/GTK
deprecation; Is this the only deprecation which needs to be fixed so
that GDK/GTK DISABLE_DEPRECATED can be usued again?

Fromconfigure.ac:

     CPPFLAGS="-DGDK_DISABLE_DEPRECATED $CPPFLAGS"
     if test \( $gtk_config_major_version -eq 3 -a
$gtk_config_minor_version -ge 10 \) ; then
         ## Allow use of deprecated & disable deprecated warnings if Gtk
 >= 3.10;
         ##  The deprecations in Gtk 3.10 will not be fixed ...
         CPPFLAGS="-DGDK_DISABLE_DEPRECATION_WARNINGS $CPPFLAGS"
     else
         CPPFLAGS="-DGTK_DISABLE_DEPRECATED $CPPFLAGS"
     fi


Comments ?

IMO it's a bug in GTK 3.18.

Bill
___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <wireshark-dev@xxxxxxxxxxxxx>
Archives:    https://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
             mailto:wireshark-dev-request@xxxxxxxxxxxxx?subject=unsubscribe