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/02de6dfe1b9c
branches:  trunk
changeset: 581522:02de6dfe1b9c
user:      lukem <lukem%NetBSD.org@localhost>
date:      Thu Jun 02 09:47:37 2005 +0000

description:
appease gcc -Wuninitialized

diffstat:

 dist/ipf/tools/ipfstat.c      |  4 ++--
 usr.sbin/wiconfig/wiconfig.c  |  5 +++--
 usr.sbin/wsmoused/selection.c |  6 ++++--
 3 files changed, 9 insertions(+), 6 deletions(-)

diffs (71 lines):

diff -r cfc5a73a5458 -r 02de6dfe1b9c dist/ipf/tools/ipfstat.c
--- a/dist/ipf/tools/ipfstat.c  Thu Jun 02 09:47:21 2005 +0000
+++ b/dist/ipf/tools/ipfstat.c  Thu Jun 02 09:47:37 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ipfstat.c,v 1.10 2005/04/03 15:05:30 martti Exp $      */
+/*     $NetBSD: ipfstat.c,v 1.11 2005/06/02 09:53:00 lukem Exp $       */
 
 /*
  * Copyright (C) 1993-2001, 2003 by Darren Reed.
@@ -1010,7 +1010,7 @@
        int maxtsentries = 0, reverse = 0, sorting = STSORT_DEFAULT;
        int i, j, winy, tsentry, maxx, maxy, redraw = 0;
        int len, srclen, dstlen, forward = 1, c = 0, ret = 0;
-       const char *errstr;
+       const char *errstr = NULL;
        ips_stat_t ipsst, *ipsstp = &ipsst;
        statetop_t *tstable = NULL, *tp;
        ipstate_t ips;
diff -r cfc5a73a5458 -r 02de6dfe1b9c usr.sbin/wiconfig/wiconfig.c
--- a/usr.sbin/wiconfig/wiconfig.c      Thu Jun 02 09:47:21 2005 +0000
+++ b/usr.sbin/wiconfig/wiconfig.c      Thu Jun 02 09:47:37 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: wiconfig.c,v 1.36 2004/08/26 20:26:08 wiz Exp $        */
+/*     $NetBSD: wiconfig.c,v 1.37 2005/06/02 09:47:37 lukem Exp $      */
 /*
  * Copyright (c) 1997, 1998, 1999
  *     Bill Paul <wpaul%ctr.columbia.edu@localhost>.  All rights reserved.
@@ -69,7 +69,7 @@
 __COPYRIGHT(
 "@(#) Copyright (c) 1997, 1998, 1999\
        Bill Paul. All rights reserved.");
-__RCSID("$NetBSD: wiconfig.c,v 1.36 2004/08/26 20:26:08 wiz Exp $");
+__RCSID("$NetBSD: wiconfig.c,v 1.37 2005/06/02 09:47:37 lukem Exp $");
 #endif
 
 struct wi_table {
@@ -829,6 +829,7 @@
                /*
                 * Lookup generic options and remember operand if found.
                 */
+               wt = NULL;      /* XXXGCC -Wuninitialized */
                for (table = wi_tables; *table != NULL; table++)
                        if ((wt = wi_optlookup(*table, ch)) != NULL) {
                                SET_OPERAND(wt->wi_optval, wt->wi_desc);
diff -r cfc5a73a5458 -r 02de6dfe1b9c usr.sbin/wsmoused/selection.c
--- a/usr.sbin/wsmoused/selection.c     Thu Jun 02 09:47:21 2005 +0000
+++ b/usr.sbin/wsmoused/selection.c     Thu Jun 02 09:47:37 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: selection.c,v 1.8 2004/01/20 22:11:02 matt Exp $ */
+/* $NetBSD: selection.c,v 1.9 2005/06/02 09:49:31 lukem Exp $ */
 
 /*
  * Copyright (c) 2002, 2003, 2004 The NetBSD Foundation, Inc.
@@ -32,7 +32,7 @@
 #include <sys/cdefs.h>
 
 #ifndef lint
-__RCSID("$NetBSD: selection.c,v 1.8 2004/01/20 22:11:02 matt Exp $");
+__RCSID("$NetBSD: selection.c,v 1.9 2005/06/02 09:49:31 lukem Exp $");
 #endif /* not lint */
 
 #include <sys/ioctl.h>
@@ -478,6 +478,8 @@
        char *ptr, *str;
        size_t l, r;
 
+       ptr = NULL;     /* XXXGCC -Wuninitialized */
+
        if (Selarea.sa_y1 == Selarea.sa_y2) {
                /* Selection is one row */
                l = row_length(Selarea.sa_y1);



Home | Main Index | Thread Index | Old Index