From: Roy Marples Date: Wed, 22 May 2013 22:58:15 +0000 (+0000) Subject: Remove some const const warnings found by clang. X-Git-Tag: v5.99.7~42 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a2258eb38346f69166a97493cd35c76b23caf34f;p=thirdparty%2Fdhcpcd.git Remove some const const warnings found by clang. --- diff --git a/bpf-filter.h b/bpf-filter.h index b68ee493..9bd15d8d 100644 --- a/bpf-filter.h +++ b/bpf-filter.h @@ -30,7 +30,7 @@ #ifndef BPF_WHOLEPACKET # define BPF_WHOLEPACKET ~0U #endif -static const struct bpf_insn const arp_bpf_filter [] = { +static const struct bpf_insn arp_bpf_filter [] = { #ifndef BPF_SKIPTYPE /* Make sure this is an ARP packet... */ BPF_STMT(BPF_LD + BPF_H + BPF_ABS, 12), @@ -75,7 +75,7 @@ static const size_t arp_bpf_filter_len = * http://www.isc.org/ */ -static const struct bpf_insn const dhcp_bpf_filter [] = { +static const struct bpf_insn dhcp_bpf_filter [] = { #ifndef BPF_SKIPTYPE /* Make sure this is an IP packet... */ BPF_STMT(BPF_LD + BPF_H + BPF_ABS, 12), diff --git a/dhcp.c b/dhcp.c index e863f375..a33d61ff 100644 --- a/dhcp.c +++ b/dhcp.c @@ -103,7 +103,7 @@ static const struct dhcp_op dhcp_ops[] = { { 0, NULL } }; -const struct dhcp_opt const dhcp_opts[] = { +const struct dhcp_opt dhcp_opts[] = { { 1, ADDRIPV4 | REQUEST, "subnet_mask" }, /* RFC 3442 states that the CSR has to come before all other * routes. For completeness, we also specify static routes, diff --git a/dhcp.h b/dhcp.h index fb4dcd19..c5124df1 100644 --- a/dhcp.h +++ b/dhcp.h @@ -237,7 +237,7 @@ struct dhcp_state { #include "net.h" #ifdef INET -extern const struct dhcp_opt const dhcp_opts[]; +extern const struct dhcp_opt dhcp_opts[]; char *decode_rfc3361(int dl, const uint8_t *data); ssize_t decode_rfc3442(char *out, ssize_t len, int pl, const uint8_t *p); diff --git a/dhcp6.c b/dhcp6.c index 66a13263..81aa6e9c 100644 --- a/dhcp6.c +++ b/dhcp6.c @@ -100,7 +100,7 @@ static const struct dhcp6_op dhcp6_ops[] = { }; #define IPV6A ADDRIPV6 | ARRAY -const struct dhcp_opt const dhcp6_opts[] = { +const struct dhcp_opt dhcp6_opts[] = { { D6_OPTION_CLIENTID, BINHEX, "client_id" }, { D6_OPTION_SERVERID, BINHEX, "server_id" }, { D6_OPTION_IA_ADDR, IPV6A, "ia_addr" }, diff --git a/dhcp6.h b/dhcp6.h index c47e23a1..c54f1115 100644 --- a/dhcp6.h +++ b/dhcp6.h @@ -82,7 +82,7 @@ #include "dhcp.h" #include "ipv6.h" -extern const struct dhcp_opt const dhcp6_opts[]; +extern const struct dhcp_opt dhcp6_opts[]; struct dhcp6_message { uint8_t type; diff --git a/if-options.c b/if-options.c index 43225780..40d9f037 100644 --- a/if-options.c +++ b/if-options.c @@ -427,7 +427,7 @@ parse_option(struct if_options *ifo, int opt, const char *arg) struct in_addr addr, addr2; in_addr_t *naddr; struct rt *rt; - const struct dhcp_opt const *d; + const struct dhcp_opt *d; uint8_t *request, *require, *no; struct if_iaid *iaid; uint8_t _iaid[4];