]> git.ipfire.org Git - thirdparty/zlib-ng.git/commitdiff
Fixed variable set but not used static analysis warning in example.
authorNathan Moinvaziri <nathan@nathanm.com>
Tue, 9 Jun 2020 04:12:58 +0000 (21:12 -0700)
committerHans Kristian Rosbach <hk-github@circlestorm.org>
Tue, 9 Jun 2020 06:32:24 +0000 (08:32 +0200)
  example.c:84:14: warning: variable ‘read’ set but not used [-Wunused-but-set-variable]
     int err, read;
  example.c:198:5: warning: Value stored to 'read' is never read [deadcode.DeadStores]
    read = PREFIX(gzfread)(uncompr, uncomprLen, 1, file);

test/example.c

index 5736a66101d69d92fe2b551e8237c71a8c30e806..e94ee33f8b2a88c427aa682acc982cca07f8615b 100644 (file)
@@ -227,7 +227,7 @@ void test_gzio(const char *fname, unsigned char *uncompr, z_size_t uncomprLen) {
         fprintf(stderr, "gzclose unexpected return when handle null\n");
         exit(1);
     }
-
+    (void)read;
 #endif
 }