Only declare the origpriority variable if we support priority.
authorEtienne Dechamps <etienne@edechamps.fr>
Sat, 12 Jul 2014 11:49:59 +0000 (12:49 +0100)
committerEtienne Dechamps <etienne@edechamps.fr>
Sat, 12 Jul 2014 12:33:59 +0000 (13:33 +0100)
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;
        ^

src/net_packet.c

index 6b3183daa85c4f1b40134e9d5a16a047c2ab59e9..b7ef5193f73b38517a5c4b060c41c57a5ce45521 100644 (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);