[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 19/32] ui/cocoa: Clean up global variable shadowing
From: |
Markus Armbruster |
Subject: |
[PULL 19/32] ui/cocoa: Clean up global variable shadowing |
Date: |
Fri, 6 Oct 2023 13:36:44 +0200 |
From: Philippe Mathieu-Daudé <philmd@linaro.org>
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>
Message-ID: <20231004120019.93101-11-philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
---
ui/cocoa.m | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/ui/cocoa.m b/ui/cocoa.m
index 145f42d190..d95276013c 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
- [PULL 07/32] hw/virtio/virtio-pci: Avoid compiler warning with -Wshadow, (continued)
- [PULL 07/32] hw/virtio/virtio-pci: Avoid compiler warning with -Wshadow, Markus Armbruster, 2023/10/06
- [PULL 31/32] linux-user/syscall.c: clean up local variable shadowing in TARGET_NR_getcpu, Markus Armbruster, 2023/10/06
- [PULL 18/32] semihosting: Clean up global variable shadowing, Markus Armbruster, 2023/10/06
- [PULL 13/32] os-posix: Clean up global variable shadowing, Markus Armbruster, 2023/10/06
- [PULL 32/32] linux-user/syscall.c: clean up local variable shadowing in xattr syscalls, Markus Armbruster, 2023/10/06
- [PULL 29/32] linux-user/mmap.c: clean up local variable shadowing, Markus Armbruster, 2023/10/06
- [PULL 12/32] net/net: Clean up global variable shadowing, Markus Armbruster, 2023/10/06
- [PULL 14/32] plugins/loader: Clean up global variable shadowing, Markus Armbruster, 2023/10/06
- [PULL 16/32] qemu-io: Clean up global variable shadowing, Markus Armbruster, 2023/10/06
- [PULL 03/32] target/ppc: Rename variables to avoid local variable shadowing in VUPKPX, Markus Armbruster, 2023/10/06
- [PULL 19/32] ui/cocoa: Clean up global variable shadowing,
Markus Armbruster <=
- [PULL 22/32] semihosting/arm-compat: Clean up local variable shadowing, Markus Armbruster, 2023/10/06
- [PULL 20/32] util/cutils: Clean up global variable shadowing in get_relocated_path(), Markus Armbruster, 2023/10/06
- [PULL 25/32] trace/control: Clean up global variable shadowing, Markus Armbruster, 2023/10/06
- [PULL 28/32] linux-user/flatload: clean up local variable shadowing, Markus Armbruster, 2023/10/06
- [PULL 17/32] qom/object_interfaces: Clean up global variable shadowing, Markus Armbruster, 2023/10/06
- [PULL 24/32] sysemu/tpm: Clean up global variable shadowing, Markus Armbruster, 2023/10/06
- [PULL 30/32] linux-user/syscall.c: clean up local variable shadowing in do_ioctl_dm(), Markus Armbruster, 2023/10/06
- [PULL 02/32] target/loongarch: Clean up local variable shadowing, Markus Armbruster, 2023/10/06
- [PULL 11/32] hw/ide/ahci: Clean up local variable shadowing, Markus Armbruster, 2023/10/06
- [PULL 23/32] softmmu/vl: Clean up global variable shadowing, Markus Armbruster, 2023/10/06