Source-Changes-HG archive

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

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



details:   https://anonhg.NetBSD.org/src/rev/cae02b9919e2
branches:  trunk
changeset: 581425:cae02b9919e2
user:      lukem <lukem%NetBSD.org@localhost>
date:      Wed Jun 01 15:41:19 2005 +0000

description:
appease gcc -Wuninitialized

diffstat:

 bin/sh/expand.c       |  6 +++---
 bin/sh/jobs.c         |  5 +++--
 bin/systrace/filter.c |  6 +++---
 3 files changed, 9 insertions(+), 8 deletions(-)

diffs (80 lines):

diff -r 0871af37cab3 -r cae02b9919e2 bin/sh/expand.c
--- a/bin/sh/expand.c   Wed Jun 01 15:38:32 2005 +0000
+++ b/bin/sh/expand.c   Wed Jun 01 15:41:19 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: expand.c,v 1.70 2005/03/19 16:38:27 dsl Exp $  */
+/*     $NetBSD: expand.c,v 1.71 2005/06/01 15:41:19 lukem Exp $        */
 
 /*-
  * Copyright (c) 1991, 1993
@@ -37,7 +37,7 @@
 #if 0
 static char sccsid[] = "@(#)expand.c   8.5 (Berkeley) 5/15/95";
 #else
-__RCSID("$NetBSD: expand.c,v 1.70 2005/03/19 16:38:27 dsl Exp $");
+__RCSID("$NetBSD: expand.c,v 1.71 2005/06/01 15:41:19 lukem Exp $");
 #endif
 #endif /* not lint */
 
@@ -186,7 +186,7 @@
        char c;
        int quotes = flag & (EXP_FULL | EXP_CASE);      /* do CTLESC */
        int firsteq = 1;
-       const char *ifs;
+       const char *ifs = NULL;
        int ifs_split = EXP_IFS_SPLIT;
 
        if (flag & EXP_IFS_SPLIT)
diff -r 0871af37cab3 -r cae02b9919e2 bin/sh/jobs.c
--- a/bin/sh/jobs.c     Wed Jun 01 15:38:32 2005 +0000
+++ b/bin/sh/jobs.c     Wed Jun 01 15:41:19 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: jobs.c,v 1.62 2003/12/18 00:56:05 christos Exp $       */
+/*     $NetBSD: jobs.c,v 1.63 2005/06/01 15:41:19 lukem Exp $  */
 
 /*-
  * Copyright (c) 1991, 1993
@@ -37,7 +37,7 @@
 #if 0
 static char sccsid[] = "@(#)jobs.c     8.5 (Berkeley) 5/4/95";
 #else
-__RCSID("$NetBSD: jobs.c,v 1.62 2003/12/18 00:56:05 christos Exp $");
+__RCSID("$NetBSD: jobs.c,v 1.63 2005/06/01 15:41:19 lukem Exp $");
 #endif
 #endif /* not lint */
 
@@ -618,6 +618,7 @@
                }
        }
 
+       retval = 127;           /* XXXGCC: -Wuninitialized */
        for (; *argptr; argptr++) {
                job = getjob(*argptr, 1);
                if (!job) {
diff -r 0871af37cab3 -r cae02b9919e2 bin/systrace/filter.c
--- a/bin/systrace/filter.c     Wed Jun 01 15:38:32 2005 +0000
+++ b/bin/systrace/filter.c     Wed Jun 01 15:41:19 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: filter.c,v 1.24 2003/11/28 21:53:32 provos Exp $       */
+/*     $NetBSD: filter.c,v 1.25 2005/06/01 15:43:56 lukem Exp $        */
 /*     $OpenBSD: filter.c,v 1.16 2002/08/08 21:18:20 provos Exp $      */
 /*
  * Copyright 2002 Niels Provos <provos%citi.umich.edu@localhost>
@@ -30,7 +30,7 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: filter.c,v 1.24 2003/11/28 21:53:32 provos Exp $");
+__RCSID("$NetBSD: filter.c,v 1.25 2005/06/01 15:43:56 lukem Exp $");
 
 #include <sys/param.h>
 #include <sys/types.h>
@@ -78,7 +78,7 @@
 filter_match(struct intercept_pid *icpid, struct intercept_tlq *tls,
     struct logic *logic)
 {
-       struct intercept_translate *tl;
+       struct intercept_translate *tl = NULL;
        int off = 0, res;
 
        switch (logic->op) {



Home | Main Index | Thread Index | Old Index