From: Sascha Wildner Date: Thu, 24 Sep 2020 19:53:56 +0000 (+0100) Subject: Clean up some warnings. X-Git-Tag: v9.3.0~12 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=61b2e192fda8cf3ab392f519806eb3bca35c15db;p=thirdparty%2Fdhcpcd.git Clean up some warnings. --- diff --git a/src/bpf.c b/src/bpf.c index d3736a1b..9e85dbe2 100644 --- a/src/bpf.c +++ b/src/bpf.c @@ -70,14 +70,14 @@ (insn)->jt = 0; \ (insn)->jf = 0; \ (insn)->k = (uint32_t)(v); \ -}; +} #define BPF_SET_JUMP(insn, c, v, t, f) { \ (insn)->code = (c); \ (insn)->jt = (t); \ (insn)->jf = (f); \ (insn)->k = (uint32_t)(v); \ -}; +} size_t bpf_frame_header_len(const struct interface *ifp) @@ -585,9 +585,6 @@ static const struct bpf_insn bpf_bootp_ether[] = { }; #define BPF_BOOTP_ETHER_LEN __arraycount(bpf_bootp_ether) -#define BOOTP_MIN_SIZE sizeof(struct ip) + sizeof(struct udphdr) + \ - sizeof(struct bootp) - static const struct bpf_insn bpf_bootp_base[] = { /* Make sure it's an IPv4 packet. */ BPF_STMT(BPF_LD + BPF_B + BPF_IND, 0), diff --git a/src/dhcp6.c b/src/dhcp6.c index 2cf40793..49412782 100644 --- a/src/dhcp6.c +++ b/src/dhcp6.c @@ -147,7 +147,7 @@ struct dhcp_compat { uint16_t dhcp6_opt; }; -const struct dhcp_compat dhcp_compats[] = { +static const struct dhcp_compat dhcp_compats[] = { { DHO_DNSSERVER, D6_OPTION_DNS_SERVERS }, { DHO_HOSTNAME, D6_OPTION_FQDN }, { DHO_DNSDOMAIN, D6_OPTION_FQDN }, diff --git a/src/dhcpcd.c b/src/dhcpcd.c index b49cf95c..e193b6ee 100644 --- a/src/dhcpcd.c +++ b/src/dhcpcd.c @@ -26,7 +26,7 @@ * SUCH DAMAGE. */ -const char dhcpcd_copyright[] = "Copyright (c) 2006-2020 Roy Marples"; +static const char dhcpcd_copyright[] = "Copyright (c) 2006-2020 Roy Marples"; #include #include diff --git a/src/ipv6nd.c b/src/ipv6nd.c index d1cc4efa..4afbf1fb 100644 --- a/src/ipv6nd.c +++ b/src/ipv6nd.c @@ -1223,7 +1223,7 @@ ipv6nd_handlera(struct dhcpcd_ctx *ctx, if (rap->willexpire) new_data = true; loglevel = new_rap || rap->willexpire || !rap->isreachable ? - LOG_INFO : LOG_DEBUG, + LOG_INFO : LOG_DEBUG; logmessage(loglevel, "%s: Router Advertisement from %s", ifp->name, rap->sfrom);