From ad448da28450c6e2953f8354ea17ca6303a25340 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Tue, 14 Nov 2017 00:32:30 +0100 Subject: [PATCH] Suppress deprecation warnings for g_option_group_free() Closes #17877. --- src/gtk/utilsgtk.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/gtk/utilsgtk.cpp b/src/gtk/utilsgtk.cpp index 76158b1ea4..110288eed7 100644 --- a/src/gtk/utilsgtk.cpp +++ b/src/gtk/utilsgtk.cpp @@ -500,7 +500,12 @@ wxGUIAppTraits::GetStandardCmdLineOptions(wxArrayString& names, desc.push_back(wxString(entryDesc)); } + // This function is deprecated in favour of g_option_group_unref(), but + // we need to continue using it as long as we support glib < 2.44 where + // the new function was introduced, so just suppress the warning. + wxGCC_WARNING_SUPPRESS(deprecated-declarations) g_option_group_free (gtkOpts); + wxGCC_WARNING_RESTORE(deprecated-declarations) } return usage;