]> git.ipfire.org Git - thirdparty/zlib-ng.git/commitdiff
Make globals in examples local to compilation unit.
authorMark Adler <madler@alumni.caltech.edu>
Fri, 14 Oct 2016 20:10:54 +0000 (13:10 -0700)
committerHans Kristian Rosbach <hk-git@circlestorm.org>
Wed, 1 Feb 2017 11:06:30 +0000 (12:06 +0100)
test/example.c
test/minigzip.c

index 6d9bad35d191d43fc10f142a3414d510e836ef59..bd50d9cb2295474a116361db6463a03a4b09a977 100644 (file)
     } \
 }
 
-const char hello[] = "hello, hello!";
+static const char hello[] = "hello, hello!";
 /* "hello world" would be more standard, but the repeated "hello"
  * stresses the compression code better, sorry...
  */
 
-const char dictionary[] = "hello";
-unsigned long dictId; /* Adler32 value of the dictionary */
+static const char dictionary[] = "hello";
+static unsigned long dictId; /* Adler32 value of the dictionary */
 
 void test_deflate       (unsigned char *compr, size_t comprLen);
 void test_inflate       (unsigned char *compr, size_t comprLen, unsigned char *uncompr, size_t uncomprLen);
index 5bfc1ce79502c5f07ed68f1fe498e0ba4ebdf696..dd81137f1dfcb5b32577f0966be1cc54f8f9a159 100644 (file)
@@ -241,7 +241,7 @@ const char *gzerror(gzFile gz, int *err)
 
 #endif 
 
-char *prog;
+static char *prog;
 
 void error            (const char *msg);
 void gz_compress      (FILE   *in, gzFile out);