[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 03/13] ui/cocoa: Temporarily ignore annoying deprecated declaratio
From: |
Philippe Mathieu-Daudé |
Subject: |
[PULL 03/13] ui/cocoa: Temporarily ignore annoying deprecated declaration warnings |
Date: |
Tue, 3 Dec 2024 12:31:30 +0100 |
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 deprecated:
first deprecated in macOS 15.0 - use NSView.displayLink(target:selector:),
NSWindow.displayLink(target:selector:), or
NSScreen.displayLink(target:selector:) [-Werror,-Wdeprecated-declarations]
662 | if (!CVDisplayLinkCreateWithCGDisplay(display, &displayLink))
{
| ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreVideo.framework/Headers/CVDisplayLink.h:89:20:
note: 'CVDisplayLinkCreateWithCGDisplay' has been explicitly marked deprecated
here
89 | CV_EXPORT CVReturn CVDisplayLinkCreateWithCGDisplay(
| ^
ui/cocoa.m:663:29: error: 'CVDisplayLinkGetNominalOutputVideoRefreshPeriod'
is deprecated: first deprecated in macOS 15.0 - use
NSView.displayLink(target:selector:), NSWindow.displayLink(target:selector:),
or NSScreen.displayLink(target:selector:) [-Werror,-Wdeprecated-declarations]
663 | CVTime period =
CVDisplayLinkGetNominalOutputVideoRefreshPeriod(displayLink);
| ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreVideo.framework/Headers/CVDisplayLink.h:182:18:
note: 'CVDisplayLinkGetNominalOutputVideoRefreshPeriod' 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
deprecated 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/Frameworks/CoreVideo.framework/Headers/CVDisplayLink.h:249:16:
note: 'CVDisplayLinkRelease' has been explicitly marked deprecated here
249 | CV_EXPORT void CVDisplayLinkRelease( CV_RELEASES_ARGUMENT
CVDisplayLinkRef 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é <philmd@linaro.org>
Reviewed-by: Phil Dennis-Jordan <phil@philjordan.eu>
Tested-by: Phil Dennis-Jordan <phil@philjordan.eu>
Message-Id: <20241121131954.98949-1-philmd@linaro.org>
---
ui/cocoa.m | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/ui/cocoa.m b/ui/cocoa.m
index 4c2dd335323..dd88115dc6f 100644
--- a/ui/cocoa.m
+++ b/ui/cocoa.m
@@ -639,6 +639,9 @@ - (void) updateBounds
[self setBoundsSize:NSMakeSize(screen.width, screen.height)];
}
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+
- (void) updateUIInfoLocked
{
/* Must be called with the BQL, i.e. via updateUIInfo */
@@ -685,6 +688,8 @@ - (void) updateUIInfoLocked
dpy_set_ui_info(dcl.con, &info, TRUE);
}
+#pragma clang diagnostic pop
+
- (void) updateUIInfo
{
if (!allow_events) {
--
2.45.2
- [PULL 00/13] Misc fixes for 2024-12-03, Philippe Mathieu-Daudé, 2024/12/03
- [PULL 01/13] hw/openrisc: Fixed undercounting of TTCR in continuous mode, Philippe Mathieu-Daudé, 2024/12/03
- [PULL 02/13] hw/openrisc/openrisc_sim: keep serial@90000000 as default, Philippe Mathieu-Daudé, 2024/12/03
- [PULL 03/13] ui/cocoa: Temporarily ignore annoying deprecated declaration warnings,
Philippe Mathieu-Daudé <=
- [PULL 04/13] MAINTAINERS: add myself as the maintainer for LoongArch VirtMachine, Philippe Mathieu-Daudé, 2024/12/03
- [PULL 05/13] meson: Add missing SDL dependency to system/main.c, Philippe Mathieu-Daudé, 2024/12/03
- [PULL 06/13] MAINTAINERS: update email addr for Brian Cain, Philippe Mathieu-Daudé, 2024/12/03
- [PULL 07/13] hw/core/machine: diagnose wrapping of maxmem, Philippe Mathieu-Daudé, 2024/12/03
- [PULL 08/13] target/riscv: Avoid bad shift in riscv_cpu_do_interrupt(), Philippe Mathieu-Daudé, 2024/12/03
- [PULL 09/13] hw/display/vga: Do not reset 'big_endian_fb' in vga_common_reset(), Philippe Mathieu-Daudé, 2024/12/03
- [PULL 10/13] hw/virtio: fix crash in processing balloon stats, Philippe Mathieu-Daudé, 2024/12/03
- [PULL 11/13] tests/qtest: drop 'fuzz-' prefix from virtio-balloon test, Philippe Mathieu-Daudé, 2024/12/03
- [PULL 12/13] tests/qtest: add test for querying balloon guest stats, Philippe Mathieu-Daudé, 2024/12/03