mirror of
https://github.com/curl/curl.git
synced 2026-04-11 12:01:42 +08:00
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
|
||
|---|---|---|
| .. | ||
| .gitignore | ||
| curl-amissl.m4 | ||
| curl-apple-sectrust.m4 | ||
| curl-compilers.m4 | ||
| curl-confopts.m4 | ||
| curl-functions.m4 | ||
| curl-gnutls.m4 | ||
| curl-mbedtls.m4 | ||
| curl-openssl.m4 | ||
| curl-override.m4 | ||
| curl-reentrant.m4 | ||
| curl-rustls.m4 | ||
| curl-schannel.m4 | ||
| curl-sysconfig.m4 | ||
| curl-wolfssl.m4 | ||
| xc-am-iface.m4 | ||
| xc-cc-check.m4 | ||
| xc-lt-iface.m4 | ||
| xc-val-flgs.m4 | ||
| zz40-xc-ovr.m4 | ||
| zz50-xc-ovr.m4 | ||