build: fix compiler warnings when CURL_DISABLE_VERBOSE_STRINGS

fix compiler warnings about unused variables and parameters when
built with --disable-verbose.

Closes https://github.com/curl/curl/pull/7377
This commit is contained in:
Sergey Markelov 2021-07-11 14:06:38 -07:00 committed by Jay Satiro
parent af1ee130f8
commit e919848ead
4 changed files with 13 additions and 0 deletions

View file

@ -1092,9 +1092,11 @@ static void nosigpipe(struct Curl_easy *data,
int onoff = 1;
if(setsockopt(sockfd, SOL_SOCKET, SO_NOSIGPIPE, (void *)&onoff,
sizeof(onoff)) < 0) {
#if !defined(CURL_DISABLE_VERBOSE_STRINGS)
char buffer[STRERROR_LEN];
infof(data, "Could not set SO_NOSIGPIPE: %s",
Curl_strerror(SOCKERRNO, buffer, sizeof(buffer)));
#endif
}
}
#else