X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=unix%2Fuxnet.c;h=c3002e4388ebc8bd50d58da45db53fbd599bf412;hb=068b67d2f6e9b186b3107ebcb1e88a141b7b5ebc;hp=1fe78436115878ce98174c6d5d9de8e158db4208;hpb=8da4fa506389910599c59b87ba1b799efd6d3ae1;p=PuTTY.git diff --git a/unix/uxnet.c b/unix/uxnet.c index 1fe78436..c3002e43 100644 --- a/unix/uxnet.c +++ b/unix/uxnet.c @@ -126,9 +126,12 @@ struct SockAddr_tag { (addr)->superfamily == UNIX ? AF_UNIX : \ (step).ai ? (step).ai->ai_family : AF_INET) #else +/* Here we gratuitously reference 'step' to avoid gcc warnings about + * 'set but not used' when compiling -DNO_IPV6 */ #define SOCKADDR_FAMILY(addr, step) \ ((addr)->superfamily == UNRESOLVED ? AF_UNSPEC : \ - (addr)->superfamily == UNIX ? AF_UNIX : AF_INET) + (addr)->superfamily == UNIX ? AF_UNIX : \ + (step).curraddr ? AF_INET : AF_INET) #endif /*