[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v3 10/16] ui/cocoa: Clean up global variable shadowing
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH v3 10/16] ui/cocoa: Clean up global variable shadowing |
Date: |
Wed, 4 Oct 2023 14:00:13 +0200 |
Fix:
ui/cocoa.m:346:20: error: declaration shadows a variable in the global scope
[-Werror,-Wshadow]
QemuCocoaView *cocoaView = userInfo;
^
ui/cocoa.m:342:16: note: previous declaration is here
QemuCocoaView *cocoaView;
^
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
ui/cocoa.m | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/ui/cocoa.m b/ui/cocoa.m
index df6d13be38..15477288fd 100644
--- a/ui/cocoa.m
+++ b/ui/cocoa.m
@@ -343,9 +343,9 @@ - (void) raiseAllKeys;
static CGEventRef handleTapEvent(CGEventTapProxy proxy, CGEventType type,
CGEventRef cgEvent, void *userInfo)
{
- QemuCocoaView *cocoaView = userInfo;
+ QemuCocoaView *view = userInfo;
NSEvent *event = [NSEvent eventWithCGEvent:cgEvent];
- if ([cocoaView isMouseGrabbed] && [cocoaView handleEvent:event]) {
+ if ([view isMouseGrabbed] && [view handleEvent:event]) {
COCOA_DEBUG("Global events tap: qemu handled the event, capturing!\n");
return NULL;
}
--
2.41.0
- Re: [PATCH v3 13/16] semihosting/arm-compat: Clean up local variable shadowing, (continued)
- [PATCH v3 14/16] softmmu/vl: Clean up global variable shadowing, Philippe Mathieu-Daudé, 2023/10/04
- [PATCH v3 15/16] sysemu/tpm: Clean up global variable shadowing, Philippe Mathieu-Daudé, 2023/10/04
- [PATCH v3 16/16] trace/control: Clean up global variable shadowing, Philippe Mathieu-Daudé, 2023/10/04
- [PATCH v3 06/16] qemu-img: Clean up global variable shadowing, Philippe Mathieu-Daudé, 2023/10/04
- [PATCH v3 10/16] ui/cocoa: Clean up global variable shadowing,
Philippe Mathieu-Daudé <=
- [PATCH v3 12/16] util/guest-random: Clean up global variable shadowing, Philippe Mathieu-Daudé, 2023/10/04
- Re: [PATCH v3 00/16] (few more) Steps towards enabling -Wshadow, Richard Henderson, 2023/10/04
- Re: [PATCH v3 00/16] (few more) Steps towards enabling -Wshadow, Markus Armbruster, 2023/10/06
- Re: [PATCH v3 00/16] (few more) Steps towards enabling -Wshadow, Markus Armbruster, 2023/10/06