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 /sysdep/unix/unix.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 'sysdep/unix/unix.h')
-rw-r--r-- | sysdep/unix/unix.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sysdep/unix/unix.h b/sysdep/unix/unix.h index 4e0ff841..3ef2e3ef 100644 --- a/sysdep/unix/unix.h +++ b/sysdep/unix/unix.h @@ -63,16 +63,16 @@ typedef struct sockaddr_bird { #endif -static inline ip_addr ipa_from_in4(struct in_addr a) +static inline ip_addr ipa_from_in4(struct in_addr a UNUSED6) { return ipa_from_u32(ntohl(a.s_addr)); } -static inline ip_addr ipa_from_in6(struct in6_addr a) +static inline ip_addr ipa_from_in6(struct in6_addr a UNUSED4) { return ipa_build6(ntohl(a.s6_addr32[0]), ntohl(a.s6_addr32[1]), ntohl(a.s6_addr32[2]), ntohl(a.s6_addr32[3])); } -static inline ip_addr ipa_from_sa4(sockaddr *sa) +static inline ip_addr ipa_from_sa4(sockaddr *sa UNUSED6) { return ipa_from_in4(((struct sockaddr_in *) sa)->sin_addr); } -static inline ip_addr ipa_from_sa6(sockaddr *sa) +static inline ip_addr ipa_from_sa6(sockaddr *sa UNUSED4) { return ipa_from_in6(((struct sockaddr_in6 *) sa)->sin6_addr); } static inline struct in_addr ipa_to_in4(ip_addr a) @@ -83,7 +83,7 @@ static inline struct in6_addr ipa_to_in6(ip_addr a) { return (struct in6_addr) { .s6_addr32 = { htonl(_I0(a)), htonl(_I1(a)), htonl(_I2(a)), htonl(_I3(a)) } }; } #else /* Temporary dummy */ -static inline struct in6_addr ipa_to_in6(ip_addr a) +static inline struct in6_addr ipa_to_in6(ip_addr a UNUSED) { return (struct in6_addr) { .s6_addr32 = { 0, 0, 0, 0 } }; } #endif |