From 5ad247050469a32aec8a0443cb17c62a4fc649be Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Wed, 27 Nov 2019 17:39:21 +0100 Subject: [PATCH] Avoid disabling -Wcast-function-type when not using gcc 8 The changes of 173f035bc24bc96af93a41d74628231b79239166 resulted in unknown warning group '-Wcast-function-type', ignored [-Wunknown-warning-option] diagnostics from clang (even clang-10) and, presumably, also from versions of gcc earlier than 8, which added this option, so use the special wxGCC_WARNING_SUPPRESS_CAST_FUNCTION_TYPE() macro added in ed01fede2e1d3b809d60275518dcb2f869aaa36c just for this instead. No real changes. --- src/gtk/evtloop.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gtk/evtloop.cpp b/src/gtk/evtloop.cpp index 1feaf3aeec..7e964bb171 100644 --- a/src/gtk/evtloop.cpp +++ b/src/gtk/evtloop.cpp @@ -381,9 +381,9 @@ void wxGUIEventLoop::DoYieldFor(long eventsToProcess) while (Pending()) // avoid false positives from our idle source gtk_main_iteration(); - wxGCC_WARNING_SUPPRESS(cast-function-type) + wxGCC_WARNING_SUPPRESS_CAST_FUNCTION_TYPE() gdk_event_handler_set ((GdkEventFunc)gtk_main_do_event, NULL, NULL); - wxGCC_WARNING_RESTORE() + wxGCC_WARNING_RESTORE_CAST_FUNCTION_TYPE() wxEventLoopBase::DoYieldFor(eventsToProcess);