From nobody Thu Apr 3 10:18:23 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1742885983859218.12042610138872; Mon, 24 Mar 2025 23:59:43 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1twy7f-0004XR-5t; Tue, 25 Mar 2025 02:50:51 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1twy7b-0004Wk-Ud; Tue, 25 Mar 2025 02:50:47 -0400 Received: from isrv.corpit.ru ([86.62.121.231]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1twy7Z-0001cL-Qu; Tue, 25 Mar 2025 02:50:47 -0400 Received: from tsrv.corpit.ru (tsrv.tls.msk.ru [192.168.177.2]) by isrv.corpit.ru (Postfix) with ESMTP id 974F1107D60; Tue, 25 Mar 2025 09:49:21 +0300 (MSK) Received: from gandalf.tls.msk.ru (mjt.wg.tls.msk.ru [192.168.177.130]) by tsrv.corpit.ru (Postfix) with ESMTP id 39E241D5E6F; Tue, 25 Mar 2025 09:50:31 +0300 (MSK) Received: by gandalf.tls.msk.ru (Postfix, from userid 1000) id 2DAA757026; Tue, 25 Mar 2025 09:50:31 +0300 (MSK) From: Michael Tokarev To: qemu-devel@nongnu.org Cc: qemu-stable@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Phil Dennis-Jordan , Michael Tokarev Subject: [Stable-7.2.17 27/34] ui/cocoa: Temporarily ignore annoying deprecated declaration warnings Date: Tue, 25 Mar 2025 09:50:22 +0300 Message-Id: <20250325065031.3263718-1-mjt@tls.msk.ru> X-Mailer: git-send-email 2.39.5 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=86.62.121.231; envelope-from=mjt@tls.msk.ru; helo=isrv.corpit.ru X-Spam_score_int: -68 X-Spam_score: -6.9 X-Spam_bar: ------ X-Spam_report: (-6.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_HI=-5, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZM-MESSAGEID: 1742885984631019100 From: Philippe Mathieu-Daud=C3=A9 These warnings are breaking some build configurations since 2 months now (https://gitlab.com/qemu-project/qemu/-/issues/2575): ui/cocoa.m:662:14: error: 'CVDisplayLinkCreateWithCGDisplay' is deprecate= d: first deprecated in macOS 15.0 - use NSView.displayLink(target:selector:= ), NSWindow.displayLink(target:selector:), or NSScreen.displayLink(target:s= elector:) [-Werror,-Wdeprecated-declarations] 662 | if (!CVDisplayLinkCreateWithCGDisplay(display, &displayLi= nk)) { | ^ /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Framew= orks/CoreVideo.framework/Headers/CVDisplayLink.h:89:20: note: 'CVDisplayLin= kCreateWithCGDisplay' has been explicitly marked deprecated here 89 | CV_EXPORT CVReturn CVDisplayLinkCreateWithCGDisplay( | ^ ui/cocoa.m:663:29: error: 'CVDisplayLinkGetNominalOutputVideoRefreshPerio= d' is deprecated: first deprecated in macOS 15.0 - use NSView.displayLink(t= arget:selector:), NSWindow.displayLink(target:selector:), or NSScreen.displ= ayLink(target:selector:) [-Werror,-Wdeprecated-declarations] 663 | CVTime period =3D CVDisplayLinkGetNominalOutputVideoR= efreshPeriod(displayLink); | ^ /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Framew= orks/CoreVideo.framework/Headers/CVDisplayLink.h:182:18: note: 'CVDisplayLi= nkGetNominalOutputVideoRefreshPeriod' has been explicitly marked deprecated= here 182 | CV_EXPORT CVTime CVDisplayLinkGetNominalOutputVideoRefreshPeriod(= CVDisplayLinkRef CV_NONNULL displayLink ); | ^ ui/cocoa.m:664:13: error: 'CVDisplayLinkRelease' is deprecated: first dep= recated in macOS 15.0 - use NSView.displayLink(target:selector:), NSWindow.= displayLink(target:selector:), or NSScreen.displayLink(target:selector:) [= -Werror,-Wdeprecated-declarations] 664 | CVDisplayLinkRelease(displayLink); | ^ /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Framew= orks/CoreVideo.framework/Headers/CVDisplayLink.h:249:16: note: 'CVDisplayLi= nkRelease' has been explicitly marked deprecated here 249 | CV_EXPORT void CVDisplayLinkRelease( CV_RELEASES_ARGUMENT CVDispl= ayLinkRef CV_NULLABLE displayLink ); | ^ 3 errors generated. For the next release, ignore the warnings using #pragma directives. At least until we figure the correct new API usage. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Phil Dennis-Jordan Tested-by: Phil Dennis-Jordan Message-Id: <20241121131954.98949-1-philmd@linaro.org> (cherry picked from commit 9cf6e41fe293dd56089faac94c36ff5cb3d96726) Signed-off-by: Michael Tokarev diff --git a/ui/cocoa.m b/ui/cocoa.m index c41689e951..54acf14794 100644 --- a/ui/cocoa.m +++ b/ui/cocoa.m @@ -549,6 +549,9 @@ - (void) setContentDimensions } } =20 +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" + - (void) updateUIInfoLocked { /* Must be called with the iothread lock, i.e. via updateUIInfo */ @@ -594,6 +597,8 @@ - (void) updateUIInfoLocked dpy_set_ui_info(dcl.con, &info, TRUE); } =20 +#pragma clang diagnostic pop + - (void) updateUIInfo { if (!allow_events) { --=20 2.39.5