From: Mark Adler Date: Fri, 14 Oct 2016 20:10:54 +0000 (-0700) Subject: Make globals in examples local to compilation unit. X-Git-Tag: 1.9.9-b1~738 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=51590d4ec78c94c8d5fdcfd22bab9718774b152d;p=thirdparty%2Fzlib-ng.git Make globals in examples local to compilation unit. --- diff --git a/test/example.c b/test/example.c index 6d9bad35d..bd50d9cb2 100644 --- a/test/example.c +++ b/test/example.c @@ -21,13 +21,13 @@ } \ } -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); diff --git a/test/minigzip.c b/test/minigzip.c index 5bfc1ce79..dd81137f1 100644 --- a/test/minigzip.c +++ b/test/minigzip.c @@ -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);