Source-Changes-HG archive

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

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



details:   https://anonhg.NetBSD.org/src/rev/7e818a10cf0c
branches:  trunk
changeset: 581378:7e818a10cf0c
user:      lukem <lukem%NetBSD.org@localhost>
date:      Wed Jun 01 05:41:48 2005 +0000

description:
appease gcc -Wuninitialized

diffstat:

 lib/libc/rpc/rpc_generic.c |  5 +++--
 lib/libc/rpc/rpcb_clnt.c   |  5 +++--
 lib/libc/rpc/rpcb_prot.c   |  6 ++++--
 3 files changed, 10 insertions(+), 6 deletions(-)

diffs (86 lines):

diff -r cb53ef3974ef -r 7e818a10cf0c lib/libc/rpc/rpc_generic.c
--- a/lib/libc/rpc/rpc_generic.c        Wed Jun 01 05:39:17 2005 +0000
+++ b/lib/libc/rpc/rpc_generic.c        Wed Jun 01 05:41:48 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rpc_generic.c,v 1.18 2005/02/09 21:35:47 kleink Exp $  */
+/*     $NetBSD: rpc_generic.c,v 1.19 2005/06/01 05:41:48 lukem Exp $   */
 
 /*
  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
@@ -41,7 +41,7 @@
 
 #include <sys/cdefs.h>
 #if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: rpc_generic.c,v 1.18 2005/02/09 21:35:47 kleink Exp $");
+__RCSID("$NetBSD: rpc_generic.c,v 1.19 2005/06/01 05:41:48 lukem Exp $");
 #endif
 
 #include "namespace.h"
@@ -700,6 +700,7 @@
         * AF_LOCAL addresses are expected to be absolute
         * pathnames, anything else will be AF_INET or AF_INET6.
         */
+       port = 0;
        if (*addrstr != '/') {
                p = strrchr(addrstr, '.');
                if (p == NULL)
diff -r cb53ef3974ef -r 7e818a10cf0c lib/libc/rpc/rpcb_clnt.c
--- a/lib/libc/rpc/rpcb_clnt.c  Wed Jun 01 05:39:17 2005 +0000
+++ b/lib/libc/rpc/rpcb_clnt.c  Wed Jun 01 05:41:48 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rpcb_clnt.c,v 1.15 2003/10/21 00:07:17 fvdl Exp $      */
+/*     $NetBSD: rpcb_clnt.c,v 1.16 2005/06/01 05:43:43 lukem Exp $     */
 
 /*
  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
@@ -39,7 +39,7 @@
 #if 0
 static char sccsid[] = "@(#)rpcb_clnt.c 1.30 89/06/21 Copyr 1988 Sun Micro";
 #else
-__RCSID("$NetBSD: rpcb_clnt.c,v 1.15 2003/10/21 00:07:17 fvdl Exp $");
+__RCSID("$NetBSD: rpcb_clnt.c,v 1.16 2005/06/01 05:43:43 lukem Exp $");
 #endif
 #endif
 
@@ -326,6 +326,7 @@
 /* VARIABLES PROTECTED BY rpcbaddr_cache_lock:  ad_cache */
 
        /* Get the address of the rpcbind.  Check cache first */
+       client = NULL;
        addr_to_delete.len = 0;
        rwlock_rdlock(&rpcbaddr_cache_lock);
        ad_cache = check_cache(host, nconf->nc_netid);
diff -r cb53ef3974ef -r 7e818a10cf0c lib/libc/rpc/rpcb_prot.c
--- a/lib/libc/rpc/rpcb_prot.c  Wed Jun 01 05:39:17 2005 +0000
+++ b/lib/libc/rpc/rpcb_prot.c  Wed Jun 01 05:41:48 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rpcb_prot.c,v 1.5 2003/09/09 03:56:40 itojun Exp $     */
+/*     $NetBSD: rpcb_prot.c,v 1.6 2005/06/01 05:46:35 lukem Exp $      */
 
 /*
  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
@@ -39,7 +39,7 @@
 #if 0
 static char sccsid[] = "@(#)rpcb_prot.c 1.9 89/04/21 Copyr 1984 Sun Micro";
 #else
-__RCSID("$NetBSD: rpcb_prot.c,v 1.5 2003/09/09 03:56:40 itojun Exp $");
+__RCSID("$NetBSD: rpcb_prot.c,v 1.6 2005/06/01 05:46:35 lukem Exp $");
 #endif
 #endif
 
@@ -139,6 +139,7 @@
        /* XXX: rp may be NULL ??? */
 
        freeing = (xdrs->x_op == XDR_FREE);
+       next = NULL;
 
        for (;;) {
                more_elements = (bool_t)(*rp != NULL);
@@ -235,6 +236,7 @@
        /* XXX: rp is allowed to be NULL ??? */
 
        freeing = (xdrs->x_op == XDR_FREE);
+       next = NULL;
 
        for (;;) {
                more_elements = (bool_t)(*rp != NULL);



Home | Main Index | Thread Index | Old Index