curl/lib/vtls
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
..
apple.c build: fully omit verbose strings and code when disabled 2026-01-21 13:18:35 +01:00
apple.h tidy-up: miscellaneous 2025-12-26 22:06:09 +01:00
cipher_suite.c tidy-up: miscellaneous 2025-12-26 22:06:09 +01:00
cipher_suite.h tidy-up: miscellaneous 2025-12-26 22:06:09 +01:00
gtls.c build: fully omit verbose strings and code when disabled 2026-01-21 13:18:35 +01:00
gtls.h tidy-up: miscellaneous 2025-12-26 22:06:09 +01:00
hostcheck.c tidy-up: miscellaneous 2025-12-26 22:06:09 +01:00
hostcheck.h tidy-up: miscellaneous 2025-12-26 22:06:09 +01:00
keylog.c tidy-up: miscellaneous 2025-12-26 22:06:09 +01:00
keylog.h spelling: 'a' vs 'an' 2025-05-30 11:38:35 +02:00
mbedtls.c build: fully omit verbose strings and code when disabled 2026-01-21 13:18:35 +01:00
mbedtls.h lib: include files using known path 2025-04-08 17:00:00 +02:00
openssl.c build: fully omit verbose strings and code when disabled 2026-01-21 13:18:35 +01:00
openssl.h tidy-up: miscellaneous 2025-12-26 22:06:09 +01:00
rustls.c tls: add new SSLSUPP flags for several options 2026-01-20 10:34:08 +01:00
rustls.h tidy-up: miscellaneous 2025-12-26 22:06:09 +01:00
schannel.c build: fully omit verbose strings and code when disabled 2026-01-21 13:18:35 +01:00
schannel.h openssl: drop includes unused or duplicate 2025-12-20 13:51:05 +01:00
schannel_int.h time-keeping: keep timestamp in multi, always update 2025-12-18 22:10:06 +01:00
schannel_verify.c tidy-up: miscellaneous 2025-12-26 22:06:09 +01:00
vtls.c windows: add build option to use the native CA store 2026-01-17 19:18:52 +01:00
vtls.h tls: add new SSLSUPP flags for several options 2026-01-20 10:34:08 +01:00
vtls_int.h vtls: drop unused use_alpn from ssl_connect_data struct 2026-01-02 10:45:12 +01:00
vtls_scache.c build: drop more forward function declarations 2026-01-14 23:34:05 +01:00
vtls_scache.h tidy-up: miscellaneous 2025-12-26 22:06:09 +01:00
vtls_spack.c tidy-up: miscellaneous 2025-12-26 22:06:09 +01:00
vtls_spack.h build: fix build errors/warnings in rare configurations 2025-07-23 22:17:03 +02:00
wolfssl.c tls: add new SSLSUPP flags for several options 2026-01-20 10:34:08 +01:00
wolfssl.h wolfssl: fix possible assert with !HAVE_NO_EX wolfSSL builds 2025-12-07 17:01:45 +01:00
x509asn1.c tidy-up: miscellaneous 2025-12-26 22:06:09 +01:00
x509asn1.h tidy-up: miscellaneous 2025-12-26 22:06:09 +01:00