]> granicus.if.org Git - curl/commitdiff
to prevent compier warnings, we only declare len if we have code
authorDaniel Stenberg <daniel@haxx.se>
Thu, 24 Jun 2004 14:52:51 +0000 (14:52 +0000)
committerDaniel Stenberg <daniel@haxx.se>
Thu, 24 Jun 2004 14:52:51 +0000 (14:52 +0000)
that uses it

lib/version.c

index 21939d9255ad67170cd83d7b3845a5a1c2bbb71f..510c20afc9f51b86029e2a98d52879958abea945 100644 (file)
@@ -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');