mirror of https://github.com/moparisthebest/curl
to prevent compier warnings, we only declare len if we have code
that uses it
This commit is contained in:
parent
bbb72b7b6b
commit
8b6b15dccc
|
@ -102,7 +102,12 @@ char *curl_version(void)
|
||||||
{
|
{
|
||||||
static char version[200];
|
static char version[200];
|
||||||
char *ptr=version;
|
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;
|
int len;
|
||||||
|
#endif
|
||||||
size_t left = sizeof(version);
|
size_t left = sizeof(version);
|
||||||
strcpy(ptr, LIBCURL_NAME "/" LIBCURL_VERSION );
|
strcpy(ptr, LIBCURL_NAME "/" LIBCURL_VERSION );
|
||||||
ptr=strchr(ptr, '\0');
|
ptr=strchr(ptr, '\0');
|
||||||
|
|
Loading…
Reference in New Issue