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:
		
							parent
							
								
									45a30f7157
								
							
						
					
					
						commit
						d7f89a7944
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -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);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue