]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
third_party:quic Fix compilation with clang-20
authorGary Lockyer <gary@catalyst.net.nz>
Thu, 14 Aug 2025 21:33:24 +0000 (09:33 +1200)
committerJule Anger <janger@samba.org>
Fri, 22 Aug 2025 12:07:10 +0000 (12:07 +0000)
Add -Wno-error=format-nonliteral so that quic builds with clang 20

../../third_party/quic/libquic/handshake.c:106:35: error:
   format string is not a string literal [-Werror,-Wformat-nonliteral]
  106 |         rc = vsnprintf(msg, sizeof(msg), fmt, arg);
      |                                          ^~~
../../third_party/quic/libquic/handshake.c:135:35: error:
   format string is not a string literal [-Werror,-Wformat-nonliteral]
  135 |         rc = vsnprintf(msg, sizeof(msg), fmt, arg);
      |                                          ^~~
../../third_party/quic/libquic/handshake.c:164:35: error:
   format string is not a string literal [-Werror,-Wformat-nonliteral]
  164 |         rc = vsnprintf(msg, sizeof(msg), fmt, arg);
      |                                          ^~~

BUG: https://bugzilla.samba.org/show_bug.cgi?id=15896

Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit de7932ea8d12348208f50f7b050b826d236ea597)

third_party/quic/wscript

index ab5cceab70b57386ae73b0b3cc72403d5f8b2b78..6ad6096e47667a37d6dc5c729de6d5839450556c 100644 (file)
@@ -42,6 +42,9 @@ def configure(conf):
     conf.ADD_NAMED_CFLAGS('LIBQUIC_UNPICKY_CFLAGS',
                           '-Wno-error=cast-qual',
                           testflags=True)
+    conf.ADD_NAMED_CFLAGS('LIBQUIC_UNPICKY_CFLAGS',
+                          '-Wno-error=format-nonliteral',
+                          testflags=True)
 
     conf.DEFINE('HAVE_LIBQUIC', '1')
     return