]> granicus.if.org Git - curl/commitdiff
curl_version: fixed Value stored to 'len' is never read
authorDaniel Stenberg <daniel@haxx.se>
Wed, 8 Aug 2012 12:58:09 +0000 (14:58 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Wed, 8 Aug 2012 12:58:09 +0000 (14:58 +0200)
Fixed this (harmless) clang-analyzer warning. Also fixed the source
indentation level.

lib/version.c

index c9175cf622fdc0e59d8ea8d99ea687a1e2818f8b..ef8353ae2a08eb94df007e8f2267294eb0470454 100644 (file)
@@ -132,12 +132,15 @@ char *curl_version(void)
     else
       suff[0] = '\0';
 
-    len = snprintf(ptr, left, " librtmp/%d.%d%s",
-      RTMP_LIB_VERSION >> 16, (RTMP_LIB_VERSION >> 8) & 0xff, suff);
+    snprintf(ptr, left, " librtmp/%d.%d%s",
+             RTMP_LIB_VERSION >> 16, (RTMP_LIB_VERSION >> 8) & 0xff,
+             suff);
 /*
   If another lib version is added below this one, this code would
   also have to do:
 
+    len = what snprintf() returned
+
     left -= len;
     ptr += len;
 */