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.
This commit is contained in:
Vadim Zeitlin
2016-02-23 17:02:38 +01:00
parent 36d6ddb8de
commit c2c2b4a7e0

View File

@@ -279,7 +279,13 @@ bool wxApp::Initialize(int& argc_, wxChar **argv_)
#if wxUSE_THREADS #if wxUSE_THREADS
if (!g_thread_supported()) 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); g_thread_init(NULL);
wxGCC_WARNING_RESTORE()
gdk_threads_init(); gdk_threads_init();
} }
#endif // wxUSE_THREADS #endif // wxUSE_THREADS