Avoid disabling -Wcast-function-type when not using gcc 8

The changes of 173f035bc2 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
ed01fede2e just for this instead.

No real changes.
This commit is contained in:
Vadim Zeitlin
2019-11-27 17:39:21 +01:00
parent ae7fcc440c
commit 5ad2470504

View File

@@ -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);