[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: gzip 1.3.11 released for testing
From: |
Paul Eggert |
Subject: |
Re: gzip 1.3.11 released for testing |
Date: |
Sun, 11 Feb 2007 21:26:34 -0800 |
User-agent: |
Gnus/5.1008 (Gnus v5.10.8) Emacs/21.4 (gnu/linux) |
address@hidden writes:
> I just noticed an old bug in gzip. The global foreground is never
> initialized.
OK, but is that a bug? C89 says that static variables must be
initialized to zero. These days GNU software tends to assume C89 or
better (it's too soon to assume C99).
Anyway, I installed this patch:
2007-02-11 Paul Eggert <address@hidden>
* gzip.c (foreground): Initialize to zero. This doesn't fix a bug
since C guarantees it's zero, but it's more consistent with the
rest of the code. Problem reported by Mark Adler.
--- gzip.c 5 Feb 2007 20:54:26 -0000 1.14
+++ gzip.c 12 Feb 2007 05:24:32 -0000
@@ -199,7 +199,7 @@ int verbose = 0; /* be verbose (-v)
int quiet = 0; /* be very quiet (-q) */
int do_lzw = 0; /* generate output compatible with old compress (-Z) */
int test = 0; /* test .gz file integrity */
-int foreground; /* set if program run in foreground */
+int foreground = 0; /* set if program run in foreground */
char *program_name; /* program name */
int maxbits = BITS; /* max bits per code for LZW */
int method = DEFLATED;/* compression method */