summaryrefslogtreecommitdiffstats
path: root/usr.sbin/rpcbind
diff options
context:
space:
mode:
authorngie <ngie@FreeBSD.org>2016-05-27 19:30:13 +0000
committerngie <ngie@FreeBSD.org>2016-05-27 19:30:13 +0000
commitf766e8e67eb978ba536b0b7783ee9014198ba399 (patch)
tree31637a4330762d57d706e0586d244bb5eab5391d /usr.sbin/rpcbind
parent761de60035ded8db43c3a1524937596cfd93c15c (diff)
downloadFreeBSD-src-f766e8e67eb978ba536b0b7783ee9014198ba399.zip
FreeBSD-src-f766e8e67eb978ba536b0b7783ee9014198ba399.tar.gz
Only expose `hint_uaddr` in the ND_DEBUG case
This fixes a -Wunused-but-set-variable warning with gcc MFC after: 1 week Reported by: gcc 5 Sponsored by: EMC / Isilon Storage Division
Diffstat (limited to 'usr.sbin/rpcbind')
-rw-r--r--usr.sbin/rpcbind/util.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/usr.sbin/rpcbind/util.c b/usr.sbin/rpcbind/util.c
index da6a5ab..25adcfc 100644
--- a/usr.sbin/rpcbind/util.c
+++ b/usr.sbin/rpcbind/util.c
@@ -119,7 +119,9 @@ addrmerge(struct netbuf *caller, const char *serv_uaddr, const char *clnt_uaddr,
struct sockaddr_storage ss;
struct netconfig *nconf;
char *caller_uaddr = NULL;
+#ifdef ND_DEBUG
const char *hint_uaddr = NULL;
+#endif
char *ret = NULL;
int bestif_goodness;
@@ -140,13 +142,17 @@ addrmerge(struct netbuf *caller, const char *serv_uaddr, const char *clnt_uaddr,
*/
hint_sa = NULL;
if (clnt_uaddr != NULL) {
+#ifdef ND_DEBUG
hint_uaddr = clnt_uaddr;
+#endif
if ((hint_nbp = uaddr2taddr(nconf, clnt_uaddr)) == NULL)
goto freeit;
hint_sa = hint_nbp->buf;
}
if (hint_sa == NULL || hint_sa->sa_family != caller_sa->sa_family) {
+#ifdef ND_DEBUG
hint_uaddr = caller_uaddr;
+#endif
hint_sa = caller->buf;
}
OpenPOWER on IntegriCloud