Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-3]: src/usr.bin/gzip Pull up revision 1.72 (requested by lukem in...
details: https://anonhg.NetBSD.org/src/rev/137f928d2201
branches: netbsd-3
changeset: 576242:137f928d2201
user: snj <snj%NetBSD.org@localhost>
date: Wed Jun 15 06:06:03 2005 +0000
description:
Pull up revision 1.72 (requested by lukem in ticket #421):
Fix numerous uninitalized variables.
Detected with gcc -Wuninitialized.
diffstat:
usr.bin/gzip/gzip.c | 16 ++++++++--------
1 files changed, 8 insertions(+), 8 deletions(-)
diffs (52 lines):
diff -r e0af0af29918 -r 137f928d2201 usr.bin/gzip/gzip.c
--- a/usr.bin/gzip/gzip.c Wed Jun 15 06:06:01 2005 +0000
+++ b/usr.bin/gzip/gzip.c Wed Jun 15 06:06:03 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: gzip.c,v 1.71 2005/02/22 21:45:44 yamt Exp $ */
+/* $NetBSD: gzip.c,v 1.71.2.1 2005/06/15 06:06:03 snj Exp $ */
/*
* Copyright (c) 1997, 1998, 2003, 2004 Matthew R. Green
@@ -32,7 +32,7 @@
#ifndef lint
__COPYRIGHT("@(#) Copyright (c) 1997, 1998, 2003, 2004 Matthew R. Green\n\
All rights reserved.\n");
-__RCSID("$NetBSD: gzip.c,v 1.71 2005/02/22 21:45:44 yamt Exp $");
+__RCSID("$NetBSD: gzip.c,v 1.71.2.1 2005/06/15 06:06:03 snj Exp $");
#endif /* not lint */
/*
@@ -664,8 +664,8 @@
{
z_stream z;
char *outbufp, *inbufp;
- off_t out_tot, in_tot;
- uint32_t out_sub_tot;
+ off_t out_tot = -1, in_tot = 0;
+ uint32_t out_sub_tot = 0;
enum {
GZSTATE_MAGIC0,
GZSTATE_MAGIC1,
@@ -685,8 +685,8 @@
GZSTATE_LEN,
} state = GZSTATE_MAGIC0;
int flags = 0, skip_count = 0;
- int error, done_reading = 0;
- uLong crc;
+ int error = Z_STREAM_ERROR, done_reading = 0;
+ uLong crc = 0;
ssize_t wr;
int needmore = 0;
@@ -1827,9 +1827,9 @@
static int first = 1;
#ifndef SMALL
static off_t in_tot, out_tot;
- uint32_t crc;
+ uint32_t crc = 0;
#endif
- off_t in;
+ off_t in = 0;
int rv;
if (first) {
Home |
Main Index |
Thread Index |
Old Index