Source-Changes-HG archive

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

[src/trunk]: src/lib/libc/gen Add an initialization to appease -Wuninitialize...



details:   https://anonhg.NetBSD.org/src/rev/2a1f7c63a351
branches:  trunk
changeset: 581754:2a1f7c63a351
user:      he <he%NetBSD.org@localhost>
date:      Sat Jun 04 22:14:00 2005 +0000

description:
Add an initialization to appease -Wuninitialized.  Apparently the
sparc64 compiler gets this wrong.

diffstat:

 lib/libc/gen/getpwent.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r cd6788031d1e -r 2a1f7c63a351 lib/libc/gen/getpwent.c
--- a/lib/libc/gen/getpwent.c   Sat Jun 04 22:09:27 2005 +0000
+++ b/lib/libc/gen/getpwent.c   Sat Jun 04 22:14:00 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: getpwent.c,v 1.68 2005/04/19 02:49:00 lukem Exp $      */
+/*     $NetBSD: getpwent.c,v 1.69 2005/06/04 22:14:00 he Exp $ */
 
 /*-
  * Copyright (c) 1997-2000, 2004-2005 The NetBSD Foundation, Inc.
@@ -95,7 +95,7 @@
 #if 0
 static char sccsid[] = "@(#)getpwent.c 8.2 (Berkeley) 4/27/95";
 #else
-__RCSID("$NetBSD: getpwent.c,v 1.68 2005/04/19 02:49:00 lukem Exp $");
+__RCSID("$NetBSD: getpwent.c,v 1.69 2005/06/04 22:14:00 he Exp $");
 #endif
 #endif /* LIBC_SCCS and not lint */
 
@@ -195,7 +195,7 @@
 {
        static int      warned;
 
-       const char      *dbfile;
+       const char      *dbfile = NULL; /* XXX -Wuninitialized in gcc */
 
        _DIAGASSERT(db != NULL);
        if (*db != NULL)                                        /* open *db */



Home | Main Index | Thread Index | Old Index