Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin appease gcc -Wuninitialized



details:   https://anonhg.NetBSD.org/src/rev/89045f3da21b
branches:  trunk
changeset: 581481:89045f3da21b
user:      lukem <lukem%NetBSD.org@localhost>
date:      Thu Jun 02 01:53:01 2005 +0000

description:
appease gcc -Wuninitialized

diffstat:

 usr.bin/hexdump/odsyntax.c |  6 +++---
 usr.bin/kdump/kdump.c      |  6 +++---
 usr.bin/make/cond.c        |  7 ++++---
 usr.bin/mkcsmapper/yacc.y  |  8 ++++----
 usr.bin/mkesdb/yacc.y      |  6 +++---
 5 files changed, 17 insertions(+), 16 deletions(-)

diffs (151 lines):

diff -r 11c1e607d57a -r 89045f3da21b usr.bin/hexdump/odsyntax.c
--- a/usr.bin/hexdump/odsyntax.c        Thu Jun 02 01:51:58 2005 +0000
+++ b/usr.bin/hexdump/odsyntax.c        Thu Jun 02 01:53:01 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: odsyntax.c,v 1.21 2004/10/30 17:43:02 dsl Exp $        */
+/*     $NetBSD: odsyntax.c,v 1.22 2005/06/02 01:53:01 lukem Exp $      */
 
 /*-
  * Copyright (c) 1990, 1993
@@ -38,7 +38,7 @@
 #if 0
 static char sccsid[] = "@(#)odsyntax.c 8.2 (Berkeley) 5/4/95";
 #else
-__RCSID("$NetBSD: odsyntax.c,v 1.21 2004/10/30 17:43:02 dsl Exp $");
+__RCSID("$NetBSD: odsyntax.c,v 1.22 2005/06/02 01:53:01 lukem Exp $");
 #endif
 #endif /* not lint */
 
@@ -214,7 +214,7 @@
 posixtypes(type_string)
        char const *type_string;
 {
-       int nbytes;
+       int nbytes = 0;
        char *fmt, type, *tmp;
        struct odformat const *odf;
 
diff -r 11c1e607d57a -r 89045f3da21b usr.bin/kdump/kdump.c
--- a/usr.bin/kdump/kdump.c     Thu Jun 02 01:51:58 2005 +0000
+++ b/usr.bin/kdump/kdump.c     Thu Jun 02 01:53:01 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kdump.c,v 1.79 2004/08/23 20:49:28 dsl Exp $   */
+/*     $NetBSD: kdump.c,v 1.80 2005/06/02 01:53:51 lukem Exp $ */
 
 /*-
  * Copyright (c) 1988, 1993
@@ -39,7 +39,7 @@
 #if 0
 static char sccsid[] = "@(#)kdump.c    8.4 (Berkeley) 4/28/95";
 #else
-__RCSID("$NetBSD: kdump.c,v 1.79 2004/08/23 20:49:28 dsl Exp $");
+__RCSID("$NetBSD: kdump.c,v 1.80 2005/06/02 01:53:51 lukem Exp $");
 #endif
 #endif /* not lint */
 
@@ -642,7 +642,7 @@
        const unsigned char *dp = vdp;
        const unsigned char *datalim = dp + datalen;
        const unsigned char *line_end;
-       int off, l, c;
+       int off, l = 0, c;
        char *cp, *bp;
        int divmask = word_sz - 1;      /* block size in bytes */
        int gdelim = 3;                 /* gap between blocks */
diff -r 11c1e607d57a -r 89045f3da21b usr.bin/make/cond.c
--- a/usr.bin/make/cond.c       Thu Jun 02 01:51:58 2005 +0000
+++ b/usr.bin/make/cond.c       Thu Jun 02 01:53:01 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cond.c,v 1.26 2005/03/01 04:34:55 christos Exp $       */
+/*     $NetBSD: cond.c,v 1.27 2005/06/02 02:03:19 lukem Exp $  */
 
 /*
  * Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -70,14 +70,14 @@
  */
 
 #ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: cond.c,v 1.26 2005/03/01 04:34:55 christos Exp $";
+static char rcsid[] = "$NetBSD: cond.c,v 1.27 2005/06/02 02:03:19 lukem Exp $";
 #else
 #include <sys/cdefs.h>
 #ifndef lint
 #if 0
 static char sccsid[] = "@(#)cond.c     8.2 (Berkeley) 1/2/94";
 #else
-__RCSID("$NetBSD: cond.c,v 1.26 2005/03/01 04:34:55 christos Exp $");
+__RCSID("$NetBSD: cond.c,v 1.27 2005/06/02 02:03:19 lukem Exp $");
 #endif
 #endif /* not lint */
 #endif
@@ -707,6 +707,7 @@
                Boolean lhsQuoted;
                Boolean rhsQuoted;
 
+               rhs = NULL;
                lhsFree = rhsFree = FALSE;
                lhsQuoted = rhsQuoted = FALSE;
                
diff -r 11c1e607d57a -r 89045f3da21b usr.bin/mkcsmapper/yacc.y
--- a/usr.bin/mkcsmapper/yacc.y Thu Jun 02 01:51:58 2005 +0000
+++ b/usr.bin/mkcsmapper/yacc.y Thu Jun 02 01:53:01 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: yacc.y,v 1.5 2004/01/05 19:20:10 itojun Exp $  */
+/*     $NetBSD: yacc.y,v 1.6 2005/06/02 02:07:54 lukem Exp $   */
 
 %{
 /*-
@@ -33,7 +33,7 @@
 
 #include <sys/cdefs.h>
 #if !defined(lint)
-__RCSID("$NetBSD: yacc.y,v 1.5 2004/01/05 19:20:10 itojun Exp $");
+__RCSID("$NetBSD: yacc.y,v 1.6 2005/06/02 02:07:54 lukem Exp $");
 #endif /* not lint */
 
 #include <assert.h>
@@ -262,7 +262,7 @@
 alloc_table(void)
 {
        size_t i;
-       u_int32_t val;
+       u_int32_t val = 0;
 
        table_size =
            (src_zone.row_end-src_zone.row_begin + 1) *
@@ -660,7 +660,7 @@
        int ch;
        extern char *optarg;
        extern int optind;
-       FILE *in;
+       FILE *in = NULL;
        int mkdb = 0, mkpv = 0;
 
        while ((ch=getopt(argc, argv, "do:mp")) != EOF) {
diff -r 11c1e607d57a -r 89045f3da21b usr.bin/mkesdb/yacc.y
--- a/usr.bin/mkesdb/yacc.y     Thu Jun 02 01:51:58 2005 +0000
+++ b/usr.bin/mkesdb/yacc.y     Thu Jun 02 01:53:01 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: yacc.y,v 1.3 2004/01/02 12:09:48 itojun Exp $  */
+/*     $NetBSD: yacc.y,v 1.4 2005/06/02 02:09:25 lukem Exp $   */
 
 %{
 /*-
@@ -33,7 +33,7 @@
 
 #include <sys/cdefs.h>
 #if !defined(lint)
-__RCSID("$NetBSD: yacc.y,v 1.3 2004/01/02 12:09:48 itojun Exp $");
+__RCSID("$NetBSD: yacc.y,v 1.4 2005/06/02 02:09:25 lukem Exp $");
 #endif /* not lint */
 
 #include <assert.h>
@@ -303,7 +303,7 @@
        int ch;
        extern char *optarg;
        extern int optind;
-       FILE *in;
+       FILE *in = NULL;
        int mkdb = 0;
 
        while ((ch=getopt(argc, argv, "do:m")) != EOF) {



Home | Main Index | Thread Index | Old Index