]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Clean up some warnings.
authorSascha Wildner <saw@online.de>
Thu, 24 Sep 2020 19:53:56 +0000 (20:53 +0100)
committerRoy Marples <roy@marples.name>
Thu, 24 Sep 2020 19:53:56 +0000 (20:53 +0100)
src/bpf.c
src/dhcp6.c
src/dhcpcd.c
src/ipv6nd.c

index d3736a1b8ae6d3d3b74066e812c90518cde9dd30..9e85dbe24ecbc43c4d6a202a02a2e67bedaeae44 100644 (file)
--- a/src/bpf.c
+++ b/src/bpf.c
        (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),
index 2cf40793fc23f13f90c9ba692bcd8051dedd31aa..49412782a17dd116a2a03fca82fc587309a5cc72 100644 (file)
@@ -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 },
index b49cf95c7280acacb19b1865179621b183b640d2..e193b6eea4117573e3b5e00b31c65b163f797aa0 100644 (file)
@@ -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 <sys/file.h>
 #include <sys/ioctl.h>
index d1cc4efab7732e17500f4823352b45fdabaa8019..4afbf1fbad6f5abdf100d929f78b329f2d7888fe 100644 (file)
@@ -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);