Source-Changes-HG archive

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

[src/trunk]: src/usr.sbin/tpctl Add initialization of a local variable to app...



details:   https://anonhg.NetBSD.org/src/rev/188f8f392403
branches:  trunk
changeset: 581856:188f8f392403
user:      he <he%NetBSD.org@localhost>
date:      Tue Jun 07 14:01:49 2005 +0000

description:
Add initialization of a local variable to appease -Wuninitialized.
Marked with XXXGCC for hpcarm (found while compiling for it).
It appears that the reason is that gcc for this target is not able
to determine unchanging complementary conditionals and sort out the
corresponding assignment / use.

diffstat:

 usr.sbin/tpctl/data.c |  6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diffs (27 lines):

diff -r 6a3162c150bb -r 188f8f392403 usr.sbin/tpctl/data.c
--- a/usr.sbin/tpctl/data.c     Tue Jun 07 13:54:55 2005 +0000
+++ b/usr.sbin/tpctl/data.c     Tue Jun 07 14:01:49 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: data.c,v 1.2 2002/12/15 09:13:21 takemura Exp $        */
+/*     $NetBSD: data.c,v 1.3 2005/06/07 14:01:49 he Exp $      */
 
 /*-
  * Copyright (c) 2002 TAKEMRUA Shin
@@ -41,7 +41,7 @@
 
 #ifndef lint
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: data.c,v 1.2 2002/12/15 09:13:21 takemura Exp $");
+__RCSID("$NetBSD: data.c,v 1.3 2005/06/07 14:01:49 he Exp $");
 #endif /* not lint */
 
 static void *
@@ -259,6 +259,8 @@
        struct tpctl_data_elem *elem;
        char *p, tmpfile[MAXPATHLEN + 1];
 
+       fd = 0;         /* XXXGCC -Wuninitialized [hpcarm] */
+
        if (filename == NULL) {
                fp = stdout;
        } else {



Home | Main Index | Thread Index | Old Index