From 651e04c4c88ae6969be416e4a7a1ffe61d7a67e9 Mon Sep 17 00:00:00 2001 From: Marcel Raad Date: Tue, 20 Jun 2017 22:33:56 +0200 Subject: [PATCH] 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. --- lib/if2ip.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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) {