curl/lib/vauth
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
..
cleartext.c tidy-up: miscellaneous 2025-12-26 22:06:09 +01:00
cram.c tidy-up: miscellaneous 2026-01-15 13:06:13 +01:00
digest.c digest: handle quotes in the path 2026-01-14 09:57:00 +01:00
digest.h tidy-up: miscellaneous 2025-12-26 22:06:09 +01:00
digest_sspi.c build: fully omit verbose strings and code when disabled 2026-01-21 13:18:35 +01:00
gsasl.c tidy-up: miscellaneous 2025-12-26 22:06:09 +01:00
krb5_gssapi.c tidy-up: miscellaneous 2025-12-26 22:06:09 +01:00
krb5_sspi.c build: drop redundant unused variable suppressions 2026-01-14 10:38:34 +01:00
ntlm.c build: drop redundant unused variable suppressions 2026-01-14 10:38:34 +01:00
ntlm_sspi.c build: drop redundant unused variable suppressions 2026-01-14 10:38:34 +01:00
oauth2.c tidy-up: miscellaneous 2025-12-26 22:06:09 +01:00
spnego_gssapi.c tidy-up: miscellaneous 2025-12-26 22:06:09 +01:00
spnego_sspi.c build: drop redundant unused variable suppressions 2026-01-14 10:38:34 +01:00
vauth.c lib: separate scheme info from protocol implementation 2026-01-19 23:15:13 +01:00
vauth.h tidy-up: miscellaneous 2025-12-26 22:06:09 +01:00