curl-curl/tests/server
Viktor Szakats 34ad78da89
curlx: move Curl_strerror, use in src and tests, ban strerror globally
Also:
- tests/server: replace local `sstrerror()` with `curlx_strerror()`.
- tests/server: show the error code next to the string, where missing.
- curlx: use `curl_msnprintf()` when building for src and tests.
  (units was already using it.)
- lib: drop unused includes found along the way.
- curlx_strerror(): avoid compiler warning (and another similar one):
  ```
  In file included from servers.c:14:
  ../../lib/../../lib/curlx/strerr.c: In function ‘curlx_strerror’:
  ../../lib/../../lib/curlx/strerr.c:328:32: error: ‘snprintf’ output may be truncated before the last format character [-Werror=format-truncation=]
    328 |       SNPRINTF(buf, buflen, "%s", msg);
        |                                ^
  ../../lib/../../lib/curlx/strerr.c:47:18: note: ‘snprintf’ output 1 or more bytes (assuming 2) into a destination of size 1
     47 | #define SNPRINTF snprintf
        |                  ^
  ../../lib/../../lib/curlx/strerr.c:328:7: note: in expansion of macro ‘SNPRINTF’
    328 |       SNPRINTF(buf, buflen, "%s", msg);
        |       ^~~~~~~~
  ```

Follow-up to 45438c8d6f #18823

Closes #18840
2025-10-06 09:44:23 +02:00
..
.checksrc checksrc: reduce directory-specific exceptions 2025-10-04 00:48:58 +02:00
.gitignore tests: always make bundles, adapt build and tests 2025-06-14 21:08:23 +02:00
CMakeLists.txt build: tidy up compiler definition for tests 2025-07-28 12:43:01 +02:00
dnsd.c curlx: move Curl_strerror, use in src and tests, ban strerror globally 2025-10-06 09:44:23 +02:00
first.c tests: make individual test sources compile cleanly 2025-06-22 15:58:15 +02:00
first.h curlx: move Curl_strerror, use in src and tests, ban strerror globally 2025-10-06 09:44:23 +02:00
getpart.c GHA/checksrc: expand spellcheck, fix issues found 2025-07-21 16:09:01 +02:00
Makefile.am build: tidy up compiler definition for tests 2025-07-28 12:43:01 +02:00
Makefile.inc curlx: move Curl_strerror, use in src and tests, ban strerror globally 2025-10-06 09:44:23 +02:00
memptr.c windows: drop redundant curl_wcsdup_callback callback 2025-07-08 13:33:38 +02:00
mqttd.c curlx: move Curl_strerror, use in src and tests, ban strerror globally 2025-10-06 09:44:23 +02:00
resolve.c tidy-up: prefer ifdef/ifndef for single checks 2025-07-27 22:35:17 +02:00
rtspd.c curlx: move Curl_strerror, use in src and tests, ban strerror globally 2025-10-06 09:44:23 +02:00
sockfilt.c curlx: move Curl_strerror, use in src and tests, ban strerror globally 2025-10-06 09:44:23 +02:00
socksd.c curlx: move Curl_strerror, use in src and tests, ban strerror globally 2025-10-06 09:44:23 +02:00
sws.c curlx: move Curl_strerror, use in src and tests, ban strerror globally 2025-10-06 09:44:23 +02:00
tftpd.c curlx: move Curl_strerror, use in src and tests, ban strerror globally 2025-10-06 09:44:23 +02:00
util.c curlx: move Curl_strerror, use in src and tests, ban strerror globally 2025-10-06 09:44:23 +02:00