curl-curl/m4
Viktor Szakats f07a98ae11
build: drop global suppression of -Wformat-nonliteral, fix fallouts
Extend two existing local suppressions to GCC, and add another
GCC-specific one as a replacement.

Before this patch suppressing this warning was odd with clang, because
after this option, `-Wformat=2` is used, which re-enables it.

Also:
- mprintf: minimize scope of a warning suppression.
- tests/server: suppress this warning for a system `vsnprintf()` call
  where it could trigger in C89 builds or with
  `CFLAGS=-DCURL_NO_FMT_CHECKS` set. Seen with Apple clang 17:
  ```
  curl/tests/server/util.c:114:37: warning: format string is not a string literal [-Wformat-nonliteral]
    114 |   vsnprintf(buffer, sizeof(buffer), msg, ap);
        |                                     ^~~
  /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/secure/_stdio.h:124:69: note: expanded from macro 'vsnprintf'
    124 | #define vsnprintf(str, len, ...) __vsnprintf_chk_func (str, len, 0, __VA_ARGS__)
        |                                                                     ^~~~~~~~~~~
  /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/secure/_stdio.h:81:65: note: expanded from macro '__vsnprintf_chk_func'
     81 |         __builtin___vsnprintf_chk (str, len, flag, __darwin_obsz(str), format, ap)
        |                                                                        ^~~~~~
  ```

Ref: #20363

Closes #20366
2026-01-20 12:38:02 +01:00
..
.gitignore tidy-up: .gitignore lines mostly 2025-01-27 20:59:46 +01:00
curl-amissl.m4 openssl: drop includes unused or duplicate 2025-12-20 13:51:05 +01:00
curl-apple-sectrust.m4 autotools: tidy-up if expressions 2025-12-10 22:29:19 +01:00
curl-compilers.m4 build: drop global suppression of -Wformat-nonliteral, fix fallouts 2026-01-20 12:38:02 +01:00
curl-confopts.m4 build: merge TrackMemory (CURLDEBUG) into debug-enabled option 2026-01-19 18:43:17 +01:00
curl-functions.m4 badwords: catch and fix threading-related words 2025-12-16 21:26:58 +01:00
curl-gnutls.m4 autotools: tidy-up if expressions 2025-12-10 22:29:19 +01:00
curl-mbedtls.m4 autotools: tidy-up if expressions 2025-12-10 22:29:19 +01:00
curl-openssl.m4 vquic: drop support for OpenSSL-QUIC 2026-01-17 22:49:34 +01:00
curl-override.m4 badwords: add more contractions, fix fallouts 2025-11-17 19:29:15 +01:00
curl-reentrant.m4 tidy-up: miscellaneous 2025-12-18 21:27:58 +01:00
curl-rustls.m4 autotools: tidy-up if expressions 2025-12-10 22:29:19 +01:00
curl-schannel.m4 autotools: tidy-up if expressions 2025-12-10 22:29:19 +01:00
curl-sysconfig.m4 autotools: tidy-up if expressions 2025-12-10 22:29:19 +01:00
curl-wolfssl.m4 lib: use (u)int64_t instead of long long 2026-01-10 12:40:54 +01:00
xc-am-iface.m4 misc: cleanup after removing years from copyright 2024-07-30 14:11:48 +02:00
xc-cc-check.m4 misc: cleanup after removing years from copyright 2024-07-30 14:11:48 +02:00
xc-lt-iface.m4 autotools: tidy-up if expressions 2025-12-10 22:29:19 +01:00
xc-val-flgs.m4 autotools: tidy-up if expressions 2025-12-10 22:29:19 +01:00
zz40-xc-ovr.m4 autotools: tidy-up if expressions 2025-12-10 22:29:19 +01:00
zz50-xc-ovr.m4 badwords: add more contractions, fix fallouts 2025-11-17 19:29:15 +01:00