aboutsummaryrefslogtreecommitdiffstats
path: root/package/network/services/dnsmasq/patches/0001-suppress-non-linux-network-unused-var-warnings.patch
blob: 97c1cfadbf9a3c2c2f878791b865754e52fd8019 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
From e68b7bee24bb04c32554e153fea2cffd69437b65 Mon Sep 17 00:00:00 2001
From: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
Date: Fri, 6 Mar 2020 10:15:20 +0000
Subject: [PATCH 1/2] suppress non linux network unused var warnings

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
---
 src/dnsmasq.c | 4 +++-
 src/network.c | 3 +++
 2 files changed, 6 insertions(+), 1 deletion(-)

--- a/src/dnsmasq.c
+++ b/src/dnsmasq.c
@@ -1860,7 +1860,8 @@ static void check_dns_listeners(time_t n
 		    if (daemon->tcp_pids[i] == 0 && daemon->tcp_pipes[i] == -1)
 		      {
 			char a;
-			
+			(void)a; /* suppress potential unused warning */
+
 			daemon->tcp_pids[i] = p;
 			daemon->tcp_pipes[i] = pipefd[0];
 #ifdef HAVE_LINUX_NETWORK
@@ -1911,6 +1912,7 @@ static void check_dns_listeners(time_t n
 	      if (!option_bool(OPT_DEBUG))
 		{
 		  char a = 0;
+		  (void)a; /* suppress potential unused warning */
 		  alarm(CHILD_LIFETIME);
 		  close(pipefd[0]); /* close read end in child. */
 		  daemon->pipe_to_parent = pipefd[1];
--- a/src/network.c
+++ b/src/network.c
@@ -785,6 +785,8 @@ int set_ipv6pktinfo(int fd)
 /* Find the interface on which a TCP connection arrived, if possible, or zero otherwise. */
 int tcp_interface(int fd, int af)
 { 
+  (void)fd; /* suppress potential unused warning */
+  (void)af; /* suppress potential unused warning */
   int if_index = 0;
 
 #ifdef HAVE_LINUX_NETWORK
@@ -1187,6 +1189,7 @@ int local_bind(int fd, union mysockaddr
 #endif
     }
 
+  (void)intname; /* suppress potential unused warning */
 #if defined(SO_BINDTODEVICE)
   if (intname[0] != 0 &&
       setsockopt(fd, SOL_SOCKET, SO_BINDTODEVICE, intname, IF_NAMESIZE) == -1)