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;
        ^
This commit is contained in:
Etienne Dechamps 2014-07-12 12:49:59 +01:00
parent 45a30f7157
commit d7f89a7944

View file

@ -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);