curl/tests/server
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
..
.checksrc build: stop overriding standard memory allocation functions 2025-11-28 10:44:26 +01:00
.gitignore tests: always make bundles, adapt build and tests 2025-06-14 21:08:23 +02:00
CMakeLists.txt localtime: detect thread-safe alternatives and use them 2025-12-16 14:30:06 +01:00
dnsd.c tests/server: fix initialization on Windows Vista+ 2025-12-15 02:14:28 +01:00
first.c build: drop duplicate C includes 2026-01-14 00:55:05 +01:00
first.h tests/server: use CURL_PRINTF(), drop -Wformat-nonliteral workaround 2026-01-13 14:27:27 +01:00
getpart.c tests: replace strcpy() with curlx_strcopy() 2025-12-23 22:25:39 +01:00
Makefile.am localtime: detect thread-safe alternatives and use them 2025-12-16 14:30:06 +01:00
Makefile.inc curlx: curlx_strcopy() instead of strcpy() 2025-12-22 23:01:05 +01:00
mqttd.c build: drop duplicate C includes 2026-01-14 00:55:05 +01:00
resolve.c tests/server: fix initialization on Windows Vista+ 2025-12-15 02:14:28 +01:00
rtspd.c tests/server: fix initialization on Windows Vista+ 2025-12-15 02:14:28 +01:00
sockfilt.c build: globally suppress DJGPP warnings in FD_SET() 2026-01-13 23:17:10 +01:00
socksd.c build: drop duplicate C includes 2026-01-14 00:55:05 +01:00
sws.c build: globally suppress DJGPP warnings in FD_SET() 2026-01-13 23:17:10 +01:00
tftpd.c tidy-up: miscellaneous 2026-01-15 13:06:13 +01:00
util.c build: drop global suppression of -Wformat-nonliteral, fix fallouts 2026-01-20 12:38:02 +01:00