]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
[v9_9] fix false positive compiler warning
authorEvan Hunt <each@isc.org>
Sat, 15 Nov 2014 08:55:20 +0000 (00:55 -0800)
committerEvan Hunt <each@isc.org>
Sat, 15 Nov 2014 08:55:20 +0000 (00:55 -0800)
a "pointer always evaluates to true" warning was blocking
compilation of the radix ATF test when using --enable-developer
with gcc 4.8.2.

lib/isc/include/isc/radix.h

index 1c1887f1d0c02f4217dd145a30bc4ea551ca3184..f6e50aa650b1003d73ef2e3cd93c994237bd7c71 100644 (file)
@@ -36,8 +36,9 @@
 
 #define NETADDR_TO_PREFIX_T(na,pt,bits) \
        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) { \