From: Marcel Raad Date: Tue, 20 Jun 2017 20:33:56 +0000 (+0200) Subject: if2ip: fix compiler warning in ISO C90 mode X-Git-Tag: curl-7_55_0~155 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=651e04c4c88ae6969be416e4a7a1ffe61d7a67e9;p=curl if2ip: fix compiler warning in ISO C90 mode remote_scope_id is only used when both HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID and ENABLE_IPV6 are defined instead of only one of them. --- diff --git a/lib/if2ip.c b/lib/if2ip.c index 4de81be60..3e74cc687 100644 --- a/lib/if2ip.c +++ b/lib/if2ip.c @@ -121,11 +121,11 @@ if2ip_result_t Curl_if2ip(int af, unsigned int remote_scope, #ifndef ENABLE_IPV6 (void) remote_scope; - -#ifndef HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID - (void) remote_scope_id; #endif +#if !defined(HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID) || \ + !defined(ENABLE_IPV6) + (void) remote_scope_id; #endif if(getifaddrs(&head) >= 0) {