From: Daniel Stenberg Date: Thu, 24 Jun 2004 14:52:51 +0000 (+0000) Subject: to prevent compier warnings, we only declare len if we have code X-Git-Tag: curl-7_12_1~198 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8b6b15dcccbe2c137a33b01370fe804462c950a6;p=curl to prevent compier warnings, we only declare len if we have code that uses it --- diff --git a/lib/version.c b/lib/version.c index 21939d925..510c20afc 100644 --- a/lib/version.c +++ b/lib/version.c @@ -102,7 +102,12 @@ char *curl_version(void) { static char version[200]; char *ptr=version; + /* to prevent compier warnings, we only declare len if we have code + that uses it */ +#if defined(USE_SSLEAY) || defined(HAVE_LIBZ) || defined(USE_ARES) || \ + defined(USE_LIBIDN) int len; +#endif size_t left = sizeof(version); strcpy(ptr, LIBCURL_NAME "/" LIBCURL_VERSION ); ptr=strchr(ptr, '\0');