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
This commit is contained in:
Marcel Raad 2019-04-05 19:57:29 +02:00
parent bb0b10135c
commit d1b5cf830b
No known key found for this signature in database
GPG key ID: FE4D8BC5EE1701DD
16 changed files with 24 additions and 17 deletions

View file

@ -114,7 +114,7 @@ typedef void CURLSH;
#ifdef CURL_STATICLIB
# define CURL_EXTERN
#elif defined(WIN32) || defined(_WIN32) || defined(__SYMBIAN32__) || \
#elif defined(WIN32) || defined(__SYMBIAN32__) || \
(__has_declspec_attribute(dllexport) && \
__has_declspec_attribute(dllimport))
# if defined(BUILDING_LIBCURL)