From: Philippe Mathieu-Daudé Date: Wed, 4 Oct 2023 12:00:13 +0000 (+0200) Subject: ui/cocoa: Clean up global variable shadowing X-Git-Tag: v8.2.0-rc0~86^2~13 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=21eb752ff53bed33594766d1dccd66efcf4f54ab;p=thirdparty%2Fqemu.git ui/cocoa: Clean up global variable shadowing 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é Message-ID: <20231004120019.93101-11-philmd@linaro.org> Reviewed-by: Richard Henderson Reviewed-by: Akihiko Odaki Signed-off-by: Markus Armbruster --- diff --git a/ui/cocoa.m b/ui/cocoa.m index 145f42d1905..d95276013c7 100644 --- a/ui/cocoa.m +++ b/ui/cocoa.m @@ -343,9 +343,9 @@ QemuCocoaView *cocoaView; 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; }