ipq40xx: add cpximg to flash Compex WPJ428 via bootloader
[openwrt/staging/mkresin.git] / package / network / services / dnsmasq / patches / 0001-suppress-non-linux-network-unused-var-warnings.patch
1 From e68b7bee24bb04c32554e153fea2cffd69437b65 Mon Sep 17 00:00:00 2001
2 From: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
3 Date: Fri, 6 Mar 2020 10:15:20 +0000
4 Subject: [PATCH 1/2] suppress non linux network unused var warnings
5
6 Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
7 ---
8 src/dnsmasq.c | 4 +++-
9 src/network.c | 3 +++
10 2 files changed, 6 insertions(+), 1 deletion(-)
11
12 --- a/src/dnsmasq.c
13 +++ b/src/dnsmasq.c
14 @@ -1860,7 +1860,8 @@ static void check_dns_listeners(time_t n
15 if (daemon->tcp_pids[i] == 0 && daemon->tcp_pipes[i] == -1)
16 {
17 char a;
18 -
19 + (void)a; /* suppress potential unused warning */
20 +
21 daemon->tcp_pids[i] = p;
22 daemon->tcp_pipes[i] = pipefd[0];
23 #ifdef HAVE_LINUX_NETWORK
24 @@ -1911,6 +1912,7 @@ static void check_dns_listeners(time_t n
25 if (!option_bool(OPT_DEBUG))
26 {
27 char a = 0;
28 + (void)a; /* suppress potential unused warning */
29 alarm(CHILD_LIFETIME);
30 close(pipefd[0]); /* close read end in child. */
31 daemon->pipe_to_parent = pipefd[1];
32 --- a/src/network.c
33 +++ b/src/network.c
34 @@ -785,6 +785,8 @@ int set_ipv6pktinfo(int fd)
35 /* Find the interface on which a TCP connection arrived, if possible, or zero otherwise. */
36 int tcp_interface(int fd, int af)
37 {
38 + (void)fd; /* suppress potential unused warning */
39 + (void)af; /* suppress potential unused warning */
40 int if_index = 0;
41
42 #ifdef HAVE_LINUX_NETWORK
43 @@ -1187,6 +1189,7 @@ int local_bind(int fd, union mysockaddr
44 #endif
45 }
46
47 + (void)intname; /* suppress potential unused warning */
48 #if defined(SO_BINDTODEVICE)
49 if (intname[0] != 0 &&
50 setsockopt(fd, SOL_SOCKET, SO_BINDTODEVICE, intname, IF_NAMESIZE) == -1)