diff options
author | Jan Moskyto Matejka <mq@ucw.cz> | 2016-10-14 15:37:04 +0200 |
---|---|---|
committer | Ondrej Zajicek (work) <santiago@crfreenet.org> | 2016-11-01 14:52:54 +0100 |
commit | 3e236955c9369475872b9b86a58502fa777b50b9 (patch) | |
tree | d43b519c2289a353e56c32b42c402f9fa12d0e13 /proto/ospf/ospf.h | |
parent | 17fe57d8dcc89aea520788914b252cf49cf060ff (diff) |
Build: switch on -Wextra, get rid of most of the warnings
There are several unresolved -Wmissing-field-initializers on older
versions of GCC than 5.1, all of them false positive.
Diffstat (limited to 'proto/ospf/ospf.h')
-rw-r--r-- | proto/ospf/ospf.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/proto/ospf/ospf.h b/proto/ospf/ospf.h index a4e525ec..ca30e4e0 100644 --- a/proto/ospf/ospf.h +++ b/proto/ospf/ospf.h @@ -766,7 +766,7 @@ lsa_get_ipv6_addr(u32 *buf, ip_addr *addr) } static inline u32 * -put_ipv6_prefix(u32 *buf, ip_addr addr, u8 pxlen, u8 pxopts, u16 lh) +put_ipv6_prefix(u32 *buf, ip_addr addr UNUSED4, u8 pxlen UNUSED4, u8 pxopts UNUSED4, u16 lh UNUSED4) { #ifdef IPV6 *buf++ = ((pxlen << 24) | (pxopts << 16) | lh); @@ -840,7 +840,7 @@ static inline int ospf_is_v2(struct ospf_proto *p) static inline int ospf_is_v3(struct ospf_proto *p) { return ! p->ospf2; } */ -static inline int ospf_get_version(struct ospf_proto *p) +static inline int ospf_get_version(struct ospf_proto *p UNUSED4 UNUSED6) { return ospf_is_v2(p) ? 2 : 3; } struct ospf_area *ospf_find_area(struct ospf_proto *p, u32 aid); @@ -897,7 +897,7 @@ void ospf_sh_neigh_info(struct ospf_neighbor *n); /* packet.c */ void ospf_pkt_fill_hdr(struct ospf_iface *ifa, void *buf, u8 h_type); uint ospf_pkt_maxsize(struct ospf_iface *ifa); -int ospf_rx_hook(sock * sk, int size); +int ospf_rx_hook(sock * sk, uint size); // void ospf_tx_hook(sock * sk); void ospf_err_hook(sock * sk, int err); void ospf_verr_hook(sock *sk, int err); @@ -922,7 +922,7 @@ static inline void ospf_send_to_des(struct ospf_iface *ifa) #define SKIP(DSC) do { err_dsc = DSC; goto skip; } while(0) #endif -static inline uint ospf_pkt_hdrlen(struct ospf_proto *p) +static inline uint ospf_pkt_hdrlen(struct ospf_proto *p UNUSED4 UNUSED6) { return ospf_is_v2(p) ? (sizeof(struct ospf_packet) + sizeof(union ospf_auth)) : sizeof(struct ospf_packet); } static inline void * ospf_tx_buffer(struct ospf_iface *ifa) |