Source-Changes-HG archive

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

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



details:   https://anonhg.NetBSD.org/src/rev/26f2b9efe233
branches:  trunk
changeset: 581519:26f2b9efe233
user:      lukem <lukem%NetBSD.org@localhost>
date:      Thu Jun 02 09:42:57 2005 +0000

description:
appease gcc -Wuninitialized

diffstat:

 usr.sbin/syslogd/syslogd.c   |  5 +++--
 usr.sbin/trpt/trpt.c         |  6 ++++--
 usr.sbin/vnconfig/vnconfig.c |  4 +++-
 3 files changed, 10 insertions(+), 5 deletions(-)

diffs (71 lines):

diff -r dbbe44a3d6e7 -r 26f2b9efe233 usr.sbin/syslogd/syslogd.c
--- a/usr.sbin/syslogd/syslogd.c        Thu Jun 02 09:41:12 2005 +0000
+++ b/usr.sbin/syslogd/syslogd.c        Thu Jun 02 09:42:57 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: syslogd.c,v 1.75 2005/01/09 00:07:27 christos Exp $    */
+/*     $NetBSD: syslogd.c,v 1.76 2005/06/02 09:42:57 lukem Exp $       */
 
 /*
  * Copyright (c) 1983, 1988, 1993, 1994
@@ -39,7 +39,7 @@
 #if 0
 static char sccsid[] = "@(#)syslogd.c  8.3 (Berkeley) 4/4/94";
 #else
-__RCSID("$NetBSD: syslogd.c,v 1.75 2005/01/09 00:07:27 christos Exp $");
+__RCSID("$NetBSD: syslogd.c,v 1.76 2005/06/02 09:42:57 lukem Exp $");
 #endif
 #endif /* not lint */
 
@@ -1176,6 +1176,7 @@
                if (l > MAXLINE)
                        l = MAXLINE;
                if (finet) {
+                       lsent = -1;
                        for (r = f->f_un.f_forw.f_addr; r; r = r->ai_next) {
                                for (j = 0; j < *finet; j++) {
 #if 0 
diff -r dbbe44a3d6e7 -r 26f2b9efe233 usr.sbin/trpt/trpt.c
--- a/usr.sbin/trpt/trpt.c      Thu Jun 02 09:41:12 2005 +0000
+++ b/usr.sbin/trpt/trpt.c      Thu Jun 02 09:42:57 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: trpt.c,v 1.19 2005/02/06 05:00:46 perry Exp $  */
+/*     $NetBSD: trpt.c,v 1.20 2005/06/02 09:44:41 lukem Exp $  */
 
 /*-
  * Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -77,7 +77,7 @@
 #if 0
 static char sccsid[] = "@(#)trpt.c     8.1 (Berkeley) 6/6/93";
 #else
-__RCSID("$NetBSD: trpt.c,v 1.19 2005/02/06 05:00:46 perry Exp $");
+__RCSID("$NetBSD: trpt.c,v 1.20 2005/06/02 09:44:41 lukem Exp $");
 #endif
 #endif /* not lint */
 
@@ -384,6 +384,8 @@
 #endif
        char hbuf[MAXHOSTNAMELEN];
 
+       len = 0;        /* XXXGCC -Wuninitialized */
+
        switch (family) {
        case AF_INET:
                if (packet) {
diff -r dbbe44a3d6e7 -r 26f2b9efe233 usr.sbin/vnconfig/vnconfig.c
--- a/usr.sbin/vnconfig/vnconfig.c      Thu Jun 02 09:41:12 2005 +0000
+++ b/usr.sbin/vnconfig/vnconfig.c      Thu Jun 02 09:42:57 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: vnconfig.c,v 1.31 2004/04/21 01:05:48 christos Exp $   */
+/*     $NetBSD: vnconfig.c,v 1.32 2005/06/02 09:45:35 lukem Exp $      */
 
 /*-
  * Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -231,6 +231,8 @@
                                struct statvfs *mnt = NULL;
                                int i, n;
 
+                               n = 0;  /* XXXGCC -Wuninitialized */
+
                                printf("vnd%d: ", vnu.vnu_unit);
 
                                dev = devname(vnu.vnu_dev, S_IFBLK);



Home | Main Index | Thread Index | Old Index