From d1b5cf830bfe169745721b21245d2217d2c2453e Mon Sep 17 00:00:00 2001 From: Marcel Raad Date: Fri, 5 Apr 2019 19:57:29 +0200 Subject: build: fix Codacy/CppCheck warnings - remove unused variables - declare conditionally used variables conditionally - suppress unused variable warnings in the CMake tests - remove dead variable stores - consistently use WIN32 macro to detect Windows Closes https://github.com/curl/curl/pull/3739 --- tests/libtest/lib1522.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'tests/libtest') diff --git a/tests/libtest/lib1522.c b/tests/libtest/lib1522.c index 2de955284..6ac2f9358 100644 --- a/tests/libtest/lib1522.c +++ b/tests/libtest/lib1522.c @@ -32,14 +32,16 @@ static char g_Data[40 * 1024]; /* POST 40KB */ static int sockopt_callback(void *clientp, curl_socket_t curlfd, curlsocktype purpose) { +#if defined(SOL_SOCKET) && defined(SO_SNDBUF) int sndbufsize = 4 * 1024; /* 4KB send buffer */ (void) clientp; (void) purpose; -#if defined(SOL_SOCKET) && defined(SO_SNDBUF) setsockopt(curlfd, SOL_SOCKET, SO_SNDBUF, (const char *)&sndbufsize, sizeof(sndbufsize)); #else + (void)clientp; (void)curlfd; + (void)purpose; #endif return CURL_SOCKOPT_OK; } -- cgit v1.2.3