From: Etienne Dechamps Date: Sat, 12 Jul 2014 11:49:59 +0000 (+0100) Subject: Only declare the origpriority variable if we support priority. X-Git-Tag: release-1.1pre11~63^2~5 X-Git-Url: https://git.tinc-vpn.org/git/browse?a=commitdiff_plain;h=d7f89a79448dd1633342ea5ee344d403c8e6890b;p=tinc Only declare the origpriority variable if we support priority. This fixes the following compiler warning when building for Windows: net_packet.c: In function ‘send_udppacket’: net_packet.c:633:6: error: unused variable ‘origpriority’ [-Werror=unused-variable] int origpriority = origpkt->priority; ^ --- diff --git a/src/net_packet.c b/src/net_packet.c index 6b3183da..b7ef5193 100644 --- a/src/net_packet.c +++ b/src/net_packet.c @@ -629,8 +629,8 @@ static void send_udppacket(node_t *n, vpn_packet_t *origpkt) { size_t outlen; #if defined(SOL_IP) && defined(IP_TOS) static int priority = 0; -#endif int origpriority = origpkt->priority; +#endif if(!n->status.reachable) { logger(DEBUG_TRAFFIC, LOG_INFO, "Trying to send UDP packet to unreachable node %s (%s)", n->name, n->hostname);