[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[RFC PATCH 4/4] ui/cocoa: Ignore 'initializer overrides' warnings
|
From: |
Philippe Mathieu-Daudé |
|
Subject: |
[RFC PATCH 4/4] ui/cocoa: Ignore 'initializer overrides' warnings |
|
Date: |
Tue, 15 Feb 2022 13:06:25 +0100 |
We globally ignore the 'initializer overrides' warnings in C code
since commit c1556a812a ("configure: Disable (clang)
initializer-overrides warnings"). Unfortunately the ${gcc_flags}
variable is not propagated to Objective-C flags ($OBJCFLAGS).
Instead of reworking the configure script to test all supported
C flags in Objective-C and sanitize them, ignore the warning
locally with the GCC diagnostic #pragma (Clang ignores it).
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
ui/cocoa.m | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/ui/cocoa.m b/ui/cocoa.m
index 30702d31a5..8956694447 100644
--- a/ui/cocoa.m
+++ b/ui/cocoa.m
@@ -638,6 +638,9 @@ QemuCocoaView *cocoaView;
qkbd_state_key_event(kbd, keycode, !qkbd_state_key_get(kbd, keycode));
}
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Winitializer-overrides"
+
// Does the work of sending input to the monitor
- (void) handleMonitorInput:(NSEvent *)event
{
@@ -702,6 +705,8 @@ QemuCocoaView *cocoaView;
}
}
+#pragma GCC diagnostic pop
+
- (bool) handleEvent:(NSEvent *)event
{
if(!allow_events) {
--
2.34.1
[PATCH 2/4] osdep: Un-inline qemu_thread_jit_execute/write, Philippe Mathieu-Daudé, 2022/02/15