Source-Changes-HG archive

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

[src/trunk]: src appease gcc -Wuninitialized



details:   https://anonhg.NetBSD.org/src/rev/104e7eae4362
branches:  trunk
changeset: 581477:104e7eae4362
user:      lukem <lukem%NetBSD.org@localhost>
date:      Thu Jun 02 01:35:57 2005 +0000

description:
appease gcc -Wuninitialized

diffstat:

 sbin/ping6/ping6.c          |  6 +++---
 usr.bin/audio/play/play.c   |  6 +++---
 usr.bin/cal/cal.c           |  6 +++---
 usr.bin/calendar/calendar.c |  6 +++---
 usr.bin/cdplay/cdplay.c     |  5 +++--
 5 files changed, 15 insertions(+), 14 deletions(-)

diffs (134 lines):

diff -r f2508639a64c -r 104e7eae4362 sbin/ping6/ping6.c
--- a/sbin/ping6/ping6.c        Thu Jun 02 01:31:30 2005 +0000
+++ b/sbin/ping6/ping6.c        Thu Jun 02 01:35:57 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ping6.c,v 1.62 2005/02/09 14:09:46 xtraeme Exp $       */
+/*     $NetBSD: ping6.c,v 1.63 2005/06/02 01:35:57 lukem Exp $ */
 /*     $KAME: ping6.c,v 1.164 2002/11/16 14:05:37 itojun Exp $ */
 
 /*
@@ -77,7 +77,7 @@
 #else
 #include <sys/cdefs.h>
 #ifndef lint
-__RCSID("$NetBSD: ping6.c,v 1.62 2005/02/09 14:09:46 xtraeme Exp $");
+__RCSID("$NetBSD: ping6.c,v 1.63 2005/06/02 01:35:57 lukem Exp $");
 #endif
 #endif
 
@@ -1978,7 +1978,7 @@
        if (nilen % (sizeof(u_int32_t) + sizeof(struct in6_addr)) == 0)
                withttl = 1;
        while (nilen > 0) {
-               u_int32_t ttl;
+               u_int32_t ttl = 0;
 
                if (withttl) {
                        /* XXX: alignment? */
diff -r f2508639a64c -r 104e7eae4362 usr.bin/audio/play/play.c
--- a/usr.bin/audio/play/play.c Thu Jun 02 01:31:30 2005 +0000
+++ b/usr.bin/audio/play/play.c Thu Jun 02 01:35:57 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: play.c,v 1.43 2004/07/09 11:34:16 wiz Exp $    */
+/*     $NetBSD: play.c,v 1.44 2005/06/02 01:38:11 lukem Exp $  */
 
 /*
  * Copyright (c) 1999 Matthew R. Green
@@ -30,7 +30,7 @@
 #include <sys/cdefs.h>
 
 #ifndef lint
-__RCSID("$NetBSD: play.c,v 1.43 2004/07/09 11:34:16 wiz Exp $");
+__RCSID("$NetBSD: play.c,v 1.44 2005/06/02 01:38:11 lukem Exp $");
 #endif
 
 
@@ -374,7 +374,7 @@
        const char      *file;
 {
        sun_audioheader *sunhdr;
-       ssize_t hdr_len;
+       ssize_t hdr_len = 0;
 
        AUDIO_INITINFO(&info);
        sunhdr = hdr;
diff -r f2508639a64c -r 104e7eae4362 usr.bin/cal/cal.c
--- a/usr.bin/cal/cal.c Thu Jun 02 01:31:30 2005 +0000
+++ b/usr.bin/cal/cal.c Thu Jun 02 01:35:57 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cal.c,v 1.18 2003/08/07 11:13:13 agc Exp $     */
+/*     $NetBSD: cal.c,v 1.19 2005/06/02 01:38:50 lukem Exp $   */
 
 /*
  * Copyright (c) 1989, 1993, 1994
@@ -42,7 +42,7 @@
 #if 0
 static char sccsid[] = "@(#)cal.c      8.4 (Berkeley) 4/2/94";
 #else
-__RCSID("$NetBSD: cal.c,v 1.18 2003/08/07 11:13:13 agc Exp $");
+__RCSID("$NetBSD: cal.c,v 1.19 2005/06/02 01:38:50 lukem Exp $");
 #endif
 #endif /* not lint */
 
@@ -426,7 +426,7 @@
                printf("\n");
 
                for (row = 0; row < 6; row++) {
-                       char *p;
+                       char *p = NULL;
 
                        memset(lineout, ' ', sizeof(lineout));
                        for (i = 0; i < skip; i++) {
diff -r f2508639a64c -r 104e7eae4362 usr.bin/calendar/calendar.c
--- a/usr.bin/calendar/calendar.c       Thu Jun 02 01:31:30 2005 +0000
+++ b/usr.bin/calendar/calendar.c       Thu Jun 02 01:35:57 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: calendar.c,v 1.36 2004/12/07 16:47:32 jwise Exp $      */
+/*     $NetBSD: calendar.c,v 1.37 2005/06/02 01:39:24 lukem Exp $      */
 
 /*
  * Copyright (c) 1989, 1993, 1994
@@ -39,7 +39,7 @@
 #if 0
 static char sccsid[] = "@(#)calendar.c 8.4 (Berkeley) 1/7/95";
 #endif
-__RCSID("$NetBSD: calendar.c,v 1.36 2004/12/07 16:47:32 jwise Exp $");
+__RCSID("$NetBSD: calendar.c,v 1.37 2005/06/02 01:39:24 lukem Exp $");
 #endif /* not lint */
 
 #include <sys/param.h>
@@ -183,7 +183,7 @@
 static void
 cal(void)
 {
-       int printing;
+       int printing = 0;
        FILE *fp;
        char *line;
 
diff -r f2508639a64c -r 104e7eae4362 usr.bin/cdplay/cdplay.c
--- a/usr.bin/cdplay/cdplay.c   Thu Jun 02 01:31:30 2005 +0000
+++ b/usr.bin/cdplay/cdplay.c   Thu Jun 02 01:35:57 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cdplay.c,v 1.29 2004/10/30 17:08:12 dsl Exp $  */
+/*     $NetBSD: cdplay.c,v 1.30 2005/06/02 01:40:10 lukem Exp $        */
 
 /*
  * Copyright (c) 1999, 2000, 2001 Andrew Doran.
@@ -40,7 +40,7 @@
 
 #include <sys/cdefs.h>
 #ifndef lint
-__RCSID("$NetBSD: cdplay.c,v 1.29 2004/10/30 17:08:12 dsl Exp $");
+__RCSID("$NetBSD: cdplay.c,v 1.30 2005/06/02 01:40:10 lukem Exp $");
 #endif /* not lint */
 
 #include <sys/types.h>
@@ -302,6 +302,7 @@
 {
        int l, r, rv;
 
+       rv = 0;
        if (cmd == CMD_QUIT) {
                close(fd);
                exit(EXIT_SUCCESS);



Home | Main Index | Thread Index | Old Index