diff options
author | Marcel Raad <Marcel.Raad@teamviewer.com> | 2019-04-05 19:57:29 +0200 |
---|---|---|
committer | Marcel Raad <Marcel.Raad@teamviewer.com> | 2019-04-11 21:08:44 +0200 |
commit | d1b5cf830bfe169745721b21245d2217d2c2453e (patch) | |
tree | 3f230490e3ba67789b84f94aebac29370b81092f /tests | |
parent | bb0b10135caf58f82ee9e9d38f400880a7e5c9cc (diff) |
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
Diffstat (limited to 'tests')
-rw-r--r-- | tests/libtest/lib1522.c | 4 |
1 files changed, 3 insertions, 1 deletions
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; } |