Blob Blame History Raw
commit 628788c1cc84c86ee4cb36ee5d4fe8954e90fca5
Author: Steve Dickson <steved@redhat.com>
Date:   Tue Sep 16 11:32:31 2008 -0400

    - Fixed some of warnings in: src/auth_time.c, src/clnt_dg.c and
        src/clnt_raw.c
    - Added some #ifdef NOTUSED around some code in src/rpbc_clnt.c
      that was not being used...
    
    Signed-off-by: Steve Dickson <steved@redhat.com>

diff --git a/src/auth_time.c b/src/auth_time.c
index d77bcf5..7cfbb7e 100644
--- a/src/auth_time.c
+++ b/src/auth_time.c
@@ -248,7 +248,8 @@ __rpc_get_time_offset(td, srv, thost, uaddr, netid)
 	nis_server		tsrv;
 	void			(*oldsig)() = NULL; /* old alarm handler */
 	struct sockaddr_in	sin;
-	int			s = RPC_ANYSOCK, len;
+	int			s = RPC_ANYSOCK;
+	socklen_t len;
 	int			type = 0;
 
 	td->tv_sec = 0;
diff --git a/src/clnt_dg.c b/src/clnt_dg.c
index 0e35742..da01c5b 100644
--- a/src/clnt_dg.c
+++ b/src/clnt_dg.c
@@ -306,7 +306,7 @@ clnt_dg_call(cl, proc, xargs, argsp, xresults, resultsp, utimeout)
 	int nrefreshes = 2;		/* number of times to refresh cred */
 	struct timeval timeout;
         struct pollfd fd;
-	int total_time, nextsend_time, tv;
+	int total_time, nextsend_time, tv=0;
 	struct sockaddr *sa;
 	sigset_t mask;
 	sigset_t newmask;
diff --git a/src/clnt_raw.c b/src/clnt_raw.c
index 36035c8..f184066 100644
--- a/src/clnt_raw.c
+++ b/src/clnt_raw.c
@@ -84,8 +84,8 @@ clnt_raw_create(prog, vers)
 {
 	struct clntraw_private *clp;
 	struct rpc_msg call_msg;
-	XDR *xdrs = &clp->xdr_stream;
-	CLIENT	*client = &clp->client_object;
+	XDR *xdrs;
+	CLIENT	*client;
 
 	mutex_lock(&clntraw_lock);
 	clp = clntraw_private;
@@ -101,6 +101,8 @@ clnt_raw_create(prog, vers)
 		clp->_raw_buf = __rpc_rawcombuf;
 		clntraw_private = clp;
 	}
+	xdrs = &clp->xdr_stream;
+	client = &clp->client_object;
 	/*
 	 * pre-serialize the static part of the call msg and stash it away
 	 */
diff --git a/src/rpbc_clnt.c b/src/rpbc_clnt.c
index 75811f0..0e25747 100644
--- a/src/rpbc_clnt.c
+++ b/src/rpbc_clnt.c
@@ -109,7 +109,9 @@ static void delete_cache(struct netbuf *);
 static void add_cache(const char *, const char *, struct netbuf *, char *);
 static CLIENT *getclnthandle(const char *, const struct netconfig *, char **);
 static CLIENT *local_rpcb(void);
+#if NOTUSED
 static struct netbuf *got_entry(rpcb_entry_list_ptr, const struct netconfig *);
+#endif
 
 /*
  * This routine adjusts the timeout used for calls to the remote rpcbind.
@@ -625,7 +627,7 @@ rpcb_unset(program, version, nconf)
 	CLNT_DESTROY(client);
 	return (rslt);
 }
-
+#ifdef NOTUSED
 /*
  * From the merged list, find the appropriate entry
  */
@@ -657,7 +659,7 @@ got_entry(relp, nconf)
 	}
 	return (na);
 }
-
+#endif
 /*
  * Quick check to see if rpcbind is up.  Tries to connect over
  * local transport.
@@ -725,7 +727,9 @@ __rpcb_findaddr_timed(program, version, nconf, host, clpp, tp)
 	CLIENT **clpp;
 	struct timeval *tp;
 {
+#ifdef NOTUSED
 	static bool_t check_rpcbind = TRUE;
+#endif
 	CLIENT *client = NULL;
 	RPCB parms;
 	enum clnt_stat clnt_st;
diff --git a/src/rpcb_clnt.c b/src/rpcb_clnt.c
index 040f4ce..ed16f00 100644
--- a/src/rpcb_clnt.c
+++ b/src/rpcb_clnt.c
@@ -109,7 +109,9 @@ static void delete_cache(struct netbuf *);
 static void add_cache(const char *, const char *, struct netbuf *, char *);
 static CLIENT *getclnthandle(const char *, const struct netconfig *, char **);
 static CLIENT *local_rpcb(void);
+#ifdef NOTUSED
 static struct netbuf *got_entry(rpcb_entry_list_ptr, const struct netconfig *);
+#endif
 
 /*
  * This routine adjusts the timeout used for calls to the remote rpcbind.
@@ -625,7 +627,7 @@ rpcb_unset(program, version, nconf)
 	CLNT_DESTROY(client);
 	return (rslt);
 }
-
+#ifdef NOTUSED
 /*
  * From the merged list, find the appropriate entry
  */
@@ -657,6 +659,7 @@ got_entry(relp, nconf)
 	}
 	return (na);
 }
+#endif
 
 /*
  * Quick check to see if rpcbind is up.  Tries to connect over
@@ -725,7 +728,9 @@ __rpcb_findaddr_timed(program, version, nconf, host, clpp, tp)
 	CLIENT **clpp;
 	struct timeval *tp;
 {
+#ifdef NOTUSED
 	static bool_t check_rpcbind = TRUE;
+#endif
 	CLIENT *client = NULL;
 	RPCB parms;
 	enum clnt_stat clnt_st;