diff options
author | Marcel Raad <Marcel.Raad@teamviewer.com> | 2020-01-03 13:30:34 +0100 |
---|---|---|
committer | Marcel Raad <Marcel.Raad@teamviewer.com> | 2020-01-03 17:02:30 +0100 |
commit | 291ed52122619c502432e00a5115057f51d21e6a (patch) | |
tree | 2e11ddaafa35cd9b9ad4c5367c3ece894e9ff7bc /lib/strerror.c | |
parent | e24ea706fbcf77c2024ca880510201898ae89927 (diff) | |
download | curl-291ed52122619c502432e00a5115057f51d21e6a.tar.gz |
lib: fix compiler warnings with `CURL_DISABLE_VERBOSE_STRINGS`
Closes https://github.com/curl/curl/pull/4775
Diffstat (limited to 'lib/strerror.c')
-rw-r--r-- | lib/strerror.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/strerror.c b/lib/strerror.c index f4f5a93a4..29df5aa55 100644 --- a/lib/strerror.c +++ b/lib/strerror.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 2004 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al. + * Copyright (C) 2004 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -449,7 +449,9 @@ curl_share_strerror(CURLSHcode error) static const char * get_winsock_error (int err, char *buf, size_t len) { +#ifndef CURL_DISABLE_VERBOSE_STRINGS const char *p; +#endif if(!len) return NULL; @@ -457,6 +459,7 @@ get_winsock_error (int err, char *buf, size_t len) *buf = '\0'; #ifdef CURL_DISABLE_VERBOSE_STRINGS + (void)err; return NULL; #else switch(err) { |