curl/.github/workflows
Viktor Szakats 61093e2a81
build: fully omit verbose strings and code when disabled
When the compiler supports C99.

- map logging functions to macro stubs when verbose logging is disabled
  and the compiler is C99. Make sure these stubs silence unused variable
  warnings for non-variadic arguments.
  Before this patch they mapped to function stubs, the same codepath
  used for C89 compiler in this configuration.

- introduce new macros to tell the compiler which code to include
  when verbose code is active, or inactive:

  - `CURLVERBOSE`: defined when verbose code is active.
    To enclose blocks of code only used for verbose logging.

  - `VERBOSE(statement);`:
    compile statement when verbose code is active.
    To mark code lines only used for verbose logging.

  - `NOVERBOSE(statement);`:
    compile statement when verbose code is inactive.
    To suppress warnings for arguments passed to logging functions via
    printf masks, e.g. `NOVERBOSE((void)ipaddress);`, yet keeping
    the warning in verbose builds.

  Note these macros are not the same as `CURL_DISABLE_VERBOSE_STRINGS`.
  Verbose code is always active in C89 mode (without variadic macro
  support).

- drop existing uses of `CURL_DISABLE_VERBOSE_STRINGS` where redundant,
  or replace with the above macros. Ending up reducing the number of
  `#ifdef`s, and also the number of lines.

Assisted-by: Daniel Stenberg
Assisted-by: Jay Satiro
Reported-by: Dan Fandrich
Fixes #20341
Refs: #12105 #12167

Closes #20353
2026-01-21 13:18:35 +01:00
..
appveyor-status.yml GHA: switch 12 Linux jobs to arm64 2026-01-09 19:35:16 +01:00
checkdocs.yml tidy-up: merge root packages directory into projects 2026-01-12 23:49:35 +01:00
checksrc.yml build: add curl-lint/lint targets, CURL_LINT cmake option 2026-01-12 16:45:24 +01:00
checkurls.yml GHA: switch 12 Linux jobs to arm64 2026-01-09 19:35:16 +01:00
codeql.yml tidy-up: merge root packages directory into projects 2026-01-12 23:49:35 +01:00
configure-vs-cmake.yml GHA: delete disable-man-db hack, runners doing it by default now 2026-01-11 15:40:21 +01:00
curl-for-win.yml GHA/curl-for-win: add CPU to Linux minimal job name 2026-01-20 03:38:18 +01:00
distcheck.yml GHA: delete disable-man-db hack, runners doing it by default now 2026-01-11 15:40:21 +01:00
fuzz.yml GHA: silence fresh zizmor 1.21.0 warnings 2026-01-16 13:48:28 +01:00
http3-linux.yml GHA: update ngtcp2/ngtcp2 to v1.20.0 2026-01-20 16:40:34 +01:00
label.yml GHA: set concurrency: where missing 2025-10-24 13:38:11 +02:00
linux-old.yml tidy-up: miscellaneous 2026-01-15 13:06:13 +01:00
linux.yml build: fully omit verbose strings and code when disabled 2026-01-21 13:18:35 +01:00
macos.yml cmake: silence silly Apple clang warnings in C89 mode, test in CI 2026-01-20 13:05:01 +01:00
non-native.yml GHA/non-native: fix size/file listing for Android shared lib 2026-01-19 16:26:43 +01:00
windows.yml build: merge TrackMemory (CURLDEBUG) into debug-enabled option 2026-01-19 18:43:17 +01:00