lib: apache style infof and trace macros/functions

- test for a simplified C99 variadic check
- args to infof() in --disable-verbose are no longer disregarded but
  must compile.

Closes #12167
Fixes #12083
Fixes #11880
Fixes #11891
This commit is contained in:
Stefan Eissing 2023-10-20 13:11:34 +02:00 committed by Daniel Stenberg
parent d1a7da6531
commit dac293cfb7
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
6 changed files with 64 additions and 71 deletions

View file

@ -102,11 +102,7 @@ static void tcpnodelay(struct Curl_easy *data, curl_socket_t sockfd)
#if defined(TCP_NODELAY)
curl_socklen_t onoff = (curl_socklen_t) 1;
int level = IPPROTO_TCP;
#if !defined(CURL_DISABLE_VERBOSE_STRINGS)
char buffer[STRERROR_LEN];
#else
(void) data;
#endif
if(setsockopt(sockfd, level, TCP_NODELAY, (void *)&onoff,
sizeof(onoff)) < 0)