1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-11-25 07:49:18 +00:00

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
This commit is contained in:
Enji Cooper 2016-05-27 19:30:13 +00:00
parent 9c8f0619db
commit 65d4c609a4
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=300867

View File

@ -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;
}