Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 27 May 2016 19:30:13 +0000 (UTC)
From:      Garrett Cooper <ngie@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r300867 - head/usr.sbin/rpcbind
Message-ID:  <201605271930.u4RJUDtA016930@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ngie
Date: Fri May 27 19:30:13 2016
New Revision: 300867
URL: https://svnweb.freebsd.org/changeset/base/300867

Log:
  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

Modified:
  head/usr.sbin/rpcbind/util.c

Modified: head/usr.sbin/rpcbind/util.c
==============================================================================
--- head/usr.sbin/rpcbind/util.c	Fri May 27 19:23:15 2016	(r300866)
+++ head/usr.sbin/rpcbind/util.c	Fri May 27 19:30:13 2016	(r300867)
@@ -119,7 +119,9 @@ addrmerge(struct netbuf *caller, const c
 	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 c
 	 */
 	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;
 	}
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201605271930.u4RJUDtA016930>