Source-Changes-HG archive

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

[src/trunk]: src/lib/libc appease gcc -Wuninitialized



details:   https://anonhg.NetBSD.org/src/rev/cd76de366fa6
branches:  trunk
changeset: 581373:cd76de366fa6
user:      lukem <lukem%NetBSD.org@localhost>
date:      Wed Jun 01 04:38:40 2005 +0000

description:
appease gcc -Wuninitialized

diffstat:

 lib/libc/gen/execvp.c      |  6 +++---
 lib/libc/net/gethnamaddr.c |  5 +++--
 lib/libc/rpc/clnt_bcast.c  |  6 +++---
 3 files changed, 9 insertions(+), 8 deletions(-)

diffs (87 lines):

diff -r 49e55c10ee24 -r cd76de366fa6 lib/libc/gen/execvp.c
--- a/lib/libc/gen/execvp.c     Wed Jun 01 03:51:58 2005 +0000
+++ b/lib/libc/gen/execvp.c     Wed Jun 01 04:38:40 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: execvp.c,v 1.24 2003/08/07 16:42:47 agc Exp $  */
+/*     $NetBSD: execvp.c,v 1.25 2005/06/01 04:40:46 lukem Exp $        */
 
 /*-
  * Copyright (c) 1991, 1993
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = "@(#)exec.c     8.1 (Berkeley) 6/4/93";
 #else
-__RCSID("$NetBSD: execvp.c,v 1.24 2003/08/07 16:42:47 agc Exp $");
+__RCSID("$NetBSD: execvp.c,v 1.25 2005/06/01 04:40:46 lukem Exp $");
 #endif
 #endif /* LIBC_SCCS and not lint */
 
@@ -73,6 +73,7 @@
                errno = ENOENT;
                goto done;
        }
+       ln = strlen(name);
        /* If it's an absolute or relative path name, it's easy. */
        if (strchr(name, '/')) {
                bp = name;
@@ -85,7 +86,6 @@
        if (!(path = getenv("PATH")))
                path = _PATH_DEFPATH;
 
-       ln = strlen(name);
        do {
                /* Find the end of this path element. */
                for (p = path; *path != 0 && *path != ':'; path++)
diff -r 49e55c10ee24 -r cd76de366fa6 lib/libc/net/gethnamaddr.c
--- a/lib/libc/net/gethnamaddr.c        Wed Jun 01 03:51:58 2005 +0000
+++ b/lib/libc/net/gethnamaddr.c        Wed Jun 01 04:38:40 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: gethnamaddr.c,v 1.64 2004/11/23 03:42:13 lukem Exp $   */
+/*     $NetBSD: gethnamaddr.c,v 1.65 2005/06/01 04:39:36 lukem Exp $   */
 
 /*
  * ++Copyright++ 1985, 1988, 1993
@@ -57,7 +57,7 @@
 static char sccsid[] = "@(#)gethostnamadr.c    8.1 (Berkeley) 6/4/93";
 static char rcsid[] = "Id: gethnamaddr.c,v 8.21 1997/06/01 20:34:37 vixie Exp ";
 #else
-__RCSID("$NetBSD: gethnamaddr.c,v 1.64 2004/11/23 03:42:13 lukem Exp $");
+__RCSID("$NetBSD: gethnamaddr.c,v 1.65 2005/06/01 04:39:36 lukem Exp $");
 #endif
 #endif /* LIBC_SCCS and not lint */
 
@@ -1271,6 +1271,7 @@
        *cp++ = '\0';
 
        /* p has should have an address */
+       addrok = 0;
        switch (af) {
        case AF_INET:
                addrok = inet_aton(p, &host_addrs[naddrs]);
diff -r 49e55c10ee24 -r cd76de366fa6 lib/libc/rpc/clnt_bcast.c
--- a/lib/libc/rpc/clnt_bcast.c Wed Jun 01 03:51:58 2005 +0000
+++ b/lib/libc/rpc/clnt_bcast.c Wed Jun 01 04:38:40 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: clnt_bcast.c,v 1.12 2003/09/09 03:56:39 itojun Exp $   */
+/*     $NetBSD: clnt_bcast.c,v 1.13 2005/06/01 04:38:40 lukem Exp $    */
 
 /*
  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
@@ -39,7 +39,7 @@
 #if 0
 static char sccsid[] = "@(#)clnt_bcast.c 1.15 89/04/21 Copyr 1988 Sun Micro";
 #else
-__RCSID("$NetBSD: clnt_bcast.c,v 1.12 2003/09/09 03:56:39 itojun Exp $");
+__RCSID("$NetBSD: clnt_bcast.c,v 1.13 2005/06/01 04:38:40 lukem Exp $");
 #endif
 #endif
 
@@ -290,7 +290,7 @@
        int fds_found;
 
 #ifdef PORTMAP
-       size_t outlen_pmap;
+       size_t outlen_pmap = 0;
        u_long port;            /* Remote port number */
        int pmap_flag = 0;      /* UDP exists ? */
        char *outbuf_pmap = NULL;



Home | Main Index | Thread Index | Old Index