qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH] buildsys: Disable 'unguarded-availability-new' warnings
@ 2025-04-22 17:19 Philippe Mathieu-Daudé
  2025-04-22 18:36 ` Pierrick Bouvier
  0 siblings, 1 reply; 6+ messages in thread
From: Philippe Mathieu-Daudé @ 2025-04-22 17:19 UTC (permalink / raw)
  To: qemu-devel
  Cc: Eric Blake, Marc-André Lureau, Paolo Bonzini,
	Daniel P. Berrangé, Pierrick Bouvier, Akihiko Odaki,
	Philippe Mathieu-Daudé

When using Visual Studio Code (v1.99.3) and Apple clangd v17.0.0
I get:

  In file included from ../../qapi/string-output-visitor.c:14:
  qemu/include/qemu/cutils.h:144:12: error: 'strchrnul' is only available on macOS 15.4 or newer [-Werror,-Wunguarded-availability-new]
    144 |     return strchrnul(s, c);
        |            ^~~~~~~~~
  /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_string.h:198:9: note: 'strchrnul' has been marked as being introduced in macOS 15.4 here, but the deployment target is macOS 15.0.0
    198 |         strchrnul(const char *__s, int __c);
        |         ^
  qemu/include/qemu/cutils.h:144:12: note: enclose 'strchrnul' in a __builtin_available check to silence this warning
    144 |     return strchrnul(s, c);
        |            ^~~~~~~~~
  1 error generated.

Disable this -Wunguarded-availability-new warning as a
short term band-aid fix.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
 meson.build | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/meson.build b/meson.build
index 41f68d38069..539368f82b1 100644
--- a/meson.build
+++ b/meson.build
@@ -735,6 +735,7 @@ warn_flags = [
   '-Wstrict-prototypes',
   '-Wtype-limits',
   '-Wundef',
+  '-Wunguarded-availability',
   '-Wvla',
   '-Wwrite-strings',
 
@@ -747,6 +748,7 @@ warn_flags = [
   '-Wno-string-plus-int',
   '-Wno-tautological-type-limit-compare',
   '-Wno-typedef-redefinition',
+  '-Wno-unguarded-availability-new',
 ]
 
 if host_os != 'darwin'
-- 
2.47.1



^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2025-04-23  5:31 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-22 17:19 [RFC PATCH] buildsys: Disable 'unguarded-availability-new' warnings Philippe Mathieu-Daudé
2025-04-22 18:36 ` Pierrick Bouvier
2025-04-22 19:45   ` Philippe Mathieu-Daudé
2025-04-22 20:31     ` Pierrick Bouvier
2025-04-23  5:24       ` Akihiko Odaki
2025-04-23  5:30         ` Philippe Mathieu-Daudé

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).