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/d7c8987e3c92
branches: trunk
changeset: 581490:d7c8987e3c92
user: lukem <lukem%NetBSD.org@localhost>
date: Thu Jun 02 04:34:57 2005 +0000
description:
appease gcc -Wuninitialized
diffstat:
usr.bin/vmstat/vmstat.c | 11 +++++++----
usr.bin/window/wwiomux.c | 6 ++++--
usr.bin/xlint/xlint/xlint.c | 6 ++++--
usr.bin/xstr/xstr.c | 6 ++++--
4 files changed, 19 insertions(+), 10 deletions(-)
diffs (115 lines):
diff -r 63b7b379da17 -r d7c8987e3c92 usr.bin/vmstat/vmstat.c
--- a/usr.bin/vmstat/vmstat.c Thu Jun 02 04:25:16 2005 +0000
+++ b/usr.bin/vmstat/vmstat.c Thu Jun 02 04:34:57 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: vmstat.c,v 1.134 2005/05/30 23:04:53 chs Exp $ */
+/* $NetBSD: vmstat.c,v 1.135 2005/06/02 04:34:57 lukem Exp $ */
/*-
* Copyright (c) 1998, 2000, 2001 The NetBSD Foundation, Inc.
@@ -77,7 +77,7 @@
#if 0
static char sccsid[] = "@(#)vmstat.c 8.2 (Berkeley) 3/1/95";
#else
-__RCSID("$NetBSD: vmstat.c,v 1.134 2005/05/30 23:04:53 chs Exp $");
+__RCSID("$NetBSD: vmstat.c,v 1.135 2005/06/02 04:34:57 lukem Exp $");
#endif
#endif /* not lint */
@@ -1410,10 +1410,13 @@
hashnl[curhash->hashtbl].n_name);
used = 0;
items = maxchain = 0;
- if (curhash->type == HASH_LIST)
+ if (curhash->type == HASH_LIST) {
hashtbl_list = hashbuf;
- else
+ hashtbl_tailq = NULL;
+ } else {
+ hashtbl_list = NULL;
hashtbl_tailq = hashbuf;
+ }
for (i = 0; i < hashsize; i++) {
if (curhash->type == HASH_LIST)
nextaddr = LIST_FIRST(&hashtbl_list[i]);
diff -r 63b7b379da17 -r d7c8987e3c92 usr.bin/window/wwiomux.c
--- a/usr.bin/window/wwiomux.c Thu Jun 02 04:25:16 2005 +0000
+++ b/usr.bin/window/wwiomux.c Thu Jun 02 04:34:57 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: wwiomux.c,v 1.11 2004/12/10 16:27:29 aymeric Exp $ */
+/* $NetBSD: wwiomux.c,v 1.12 2005/06/02 04:37:17 lukem Exp $ */
/*
* Copyright (c) 1983, 1993
@@ -37,7 +37,7 @@
#if 0
static char sccsid[] = "@(#)wwiomux.c 8.1 (Berkeley) 6/6/93";
#else
-__RCSID("$NetBSD: wwiomux.c,v 1.11 2004/12/10 16:27:29 aymeric Exp $");
+__RCSID("$NetBSD: wwiomux.c,v 1.12 2005/06/02 04:37:17 lukem Exp $");
#endif
#endif /* not lint */
@@ -75,6 +75,8 @@
static struct pollfd *pfd = NULL;
static size_t maxfds = 0;
+ c = 0; /* XXXGCC -Wuninitialized */
+
for (;;) {
if (wwinterrupt()) {
wwclrintr();
diff -r 63b7b379da17 -r d7c8987e3c92 usr.bin/xlint/xlint/xlint.c
--- a/usr.bin/xlint/xlint/xlint.c Thu Jun 02 04:25:16 2005 +0000
+++ b/usr.bin/xlint/xlint/xlint.c Thu Jun 02 04:34:57 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: xlint.c,v 1.36 2005/02/09 21:24:48 dsl Exp $ */
+/* $NetBSD: xlint.c,v 1.37 2005/06/02 04:38:46 lukem Exp $ */
/*
* Copyright (c) 1996 Christopher G. Demetriou. All Rights Reserved.
@@ -38,7 +38,7 @@
#include <sys/cdefs.h>
#if defined(__RCSID) && !defined(lint)
-__RCSID("$NetBSD: xlint.c,v 1.36 2005/02/09 21:24:48 dsl Exp $");
+__RCSID("$NetBSD: xlint.c,v 1.37 2005/06/02 04:38:46 lukem Exp $");
#endif
#include <sys/param.h>
@@ -531,6 +531,8 @@
if (arg[0] == '-') {
char ***list;
+ list = NULL; /* XXXGCC -Wuninitialized */
+
/* option */
switch (arg[1]) {
case 'l':
diff -r 63b7b379da17 -r d7c8987e3c92 usr.bin/xstr/xstr.c
--- a/usr.bin/xstr/xstr.c Thu Jun 02 04:25:16 2005 +0000
+++ b/usr.bin/xstr/xstr.c Thu Jun 02 04:34:57 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: xstr.c,v 1.20 2004/07/23 13:45:59 wiz Exp $ */
+/* $NetBSD: xstr.c,v 1.21 2005/06/02 04:40:00 lukem Exp $ */
/*
* Copyright (c) 1980, 1993
@@ -39,7 +39,7 @@
#if 0
static char sccsid[] = "@(#)xstr.c 8.1 (Berkeley) 6/9/93";
#else
-__RCSID("$NetBSD: xstr.c,v 1.20 2004/07/23 13:45:59 wiz Exp $");
+__RCSID("$NetBSD: xstr.c,v 1.21 2005/06/02 04:40:00 lukem Exp $");
#endif
#endif /* not lint */
@@ -388,6 +388,8 @@
int c;
char *buf = obuf;
+ c = 0; /* XXXGCC -Wuninitialized */
+
while (--rmdr > 0 && (c = xgetc(file) != 0 && c != EOF))
*buf++ = c;
*buf++ = 0;
Home |
Main Index |
Thread Index |
Old Index