From c2c2b4a7e00b78ca2d56c3b2466546fb5cd1c564 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Tue, 23 Feb 2016 17:02:38 +0100 Subject: [PATCH] Disable deprecation warning for g_thread_init() We still must use it for older glib versions, presumably, so just disable the warning about it being deprecated in non-ancient glib. --- src/gtk/app.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/gtk/app.cpp b/src/gtk/app.cpp index bebb83d389..517541ea2e 100644 --- a/src/gtk/app.cpp +++ b/src/gtk/app.cpp @@ -279,7 +279,13 @@ bool wxApp::Initialize(int& argc_, wxChar **argv_) #if wxUSE_THREADS if (!g_thread_supported()) { + // g_thread_init() does nothing and is deprecated in recent glib but + // might still be needed in the older versions, which are the only ones + // for which this code is going to be executed (as g_thread_supported() + // is always TRUE in these recent glib versions anyhow). + wxGCC_WARNING_SUPPRESS(deprecated-declarations) g_thread_init(NULL); + wxGCC_WARNING_RESTORE() gdk_threads_init(); } #endif // wxUSE_THREADS