From 36d6ddb8de4a9c29b4fc04a7450ac5bfd7839b17 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Tue, 23 Feb 2016 16:50:39 +0100 Subject: [PATCH] Disable warnings about deprecated declarations in wxGTK3 build There are just too many of these warnings because GTK+ people are extremely deprecation-happy and like marking functions which need to be used for the code to work with the older GTK+ versions as deprecated. Because of this, in many cases we have no choice but to continue to use the now deprecated functions and the only way to avoid them is to pepper the code with the pragmas doing this. Disabling the warning globally seems like the lesser evil because not disabling them at all is worse than useless as the flood of the unavoidable deprecation warnings hides any real ones that might occur. --- configure | 2 +- configure.in | 11 ++++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/configure b/configure index 52771b0f78..e405425204 100755 --- a/configure +++ b/configure @@ -36039,7 +36039,7 @@ case ".$ac_cv_cxxflags_gcc_option__Woverloaded_virtual" in esac - if test "$wxUSE_MAC" = 1 ; then + if test "$WXGTK3" = 1 -o "$wxUSE_MAC" = 1 ; then CXXWARNINGS="$CXXWARNINGS -Wno-deprecated-declarations" fi fi diff --git a/configure.in b/configure.in index 5dcaefec47..ed87180831 100644 --- a/configure.in +++ b/configure.in @@ -7497,11 +7497,12 @@ elif test "$GXX" = yes ; then CXXWARNINGS="-Wall -Wundef -Wunused-parameter -Wno-ctor-dtor-privacy" AX_CXXFLAGS_GCC_OPTION(-Woverloaded-virtual, CXXWARNINGS) - dnl when building under Mac we currently get hundreds of deprecation - dnl warnings for Cocoa symbols from the standard headers -- disable them - dnl as we already know that they're deprecated and nothing else can be seen - dnl with these warnings on - if test "$wxUSE_MAC" = 1 ; then + dnl when building using GTK+ 3 or Cocoa we currently get tons of deprecation + dnl warnings from the standard headers -- disable them as we already know + dnl that they're deprecated but we still have to use them to support older + dnl toolkit versions and leaving this warning enabled prevents seeing any + dnl other ones + if test "$WXGTK3" = 1 -o "$wxUSE_MAC" = 1 ; then CXXWARNINGS="$CXXWARNINGS -Wno-deprecated-declarations" fi fi