From: Evan Hunt Date: Sat, 15 Nov 2014 08:56:30 +0000 (-0800) Subject: [master] fix false positive compiler warning X-Git-Tag: v9.11.0a1~1267 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=63fb92c1ba488a9a63c410a96a39f714ae01d83b;p=thirdparty%2Fbind9.git [master] fix false positive compiler warning a "pointer always evaluates to true" warning was blocking compilation of the radix ATF test when using --enable-developer with gcc 4.8.2. --- diff --git a/lib/isc/include/isc/radix.h b/lib/isc/include/isc/radix.h index 24c183f2c21..ed6de39985d 100644 --- a/lib/isc/include/isc/radix.h +++ b/lib/isc/include/isc/radix.h @@ -34,8 +34,9 @@ #define NETADDR_TO_PREFIX_T(na,pt,bits,is_ecs) \ do { \ + const void *p = na; \ memset(&(pt), 0, sizeof(pt)); \ - if((na) != NULL) { \ + if (p != NULL) { \ (pt).family = (na)->family; \ (pt).bitlen = (bits); \ if ((pt).family == AF_INET6) { \