Source-Changes-HG archive

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

[src/trunk]: src/usr.bin/make Fix warning about uninitialized variable



details:   https://anonhg.NetBSD.org/src/rev/51c1c66d3ce5
branches:  trunk
changeset: 338451:51c1c66d3ce5
user:      manu <manu%NetBSD.org@localhost>
date:      Mon May 25 09:01:06 2015 +0000

description:
Fix warning about uninitialized variable

This warning gets fatal when including make(1) as a crunchgen(1) binary.

diffstat:

 usr.bin/make/targ.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (35 lines):

diff -r f4c7e715a3a3 -r 51c1c66d3ce5 usr.bin/make/targ.c
--- a/usr.bin/make/targ.c       Mon May 25 08:57:31 2015 +0000
+++ b/usr.bin/make/targ.c       Mon May 25 09:01:06 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: targ.c,v 1.59 2014/09/07 20:55:34 joerg Exp $  */
+/*     $NetBSD: targ.c,v 1.60 2015/05/25 09:01:06 manu Exp $   */
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -69,14 +69,14 @@
  */
 
 #ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: targ.c,v 1.59 2014/09/07 20:55:34 joerg Exp $";
+static char rcsid[] = "$NetBSD: targ.c,v 1.60 2015/05/25 09:01:06 manu Exp $";
 #else
 #include <sys/cdefs.h>
 #ifndef lint
 #if 0
 static char sccsid[] = "@(#)targ.c     8.2 (Berkeley) 3/19/94";
 #else
-__RCSID("$NetBSD: targ.c,v 1.59 2014/09/07 20:55:34 joerg Exp $");
+__RCSID("$NetBSD: targ.c,v 1.60 2015/05/25 09:01:06 manu Exp $");
 #endif
 #endif /* not lint */
 #endif
@@ -334,7 +334,7 @@
 Targ_FindNode(const char *name, int flags)
 {
     GNode         *gn;       /* node in that element */
-    Hash_Entry   *he;        /* New or used hash entry for node */
+    Hash_Entry   *he = NULL; /* New or used hash entry for node */
     Boolean      isNew;      /* Set TRUE if Hash_CreateEntry had to create */
                              /* an entry for the node */
 



Home | Main Index | Thread Index | Old Index