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/io.c | |
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/io.c')
-rw-r--r-- | sysdep/unix/io.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sysdep/unix/io.c b/sysdep/unix/io.c index 3ceadd98..873b5805 100644 --- a/sysdep/unix/io.c +++ b/sysdep/unix/io.c @@ -507,11 +507,11 @@ tm_format_datetime(char *x, struct timeformat *fmt_spec, bird_clock_t t) * Sockaddr helper functions */ -static inline int sockaddr_length(int af) +static inline int UNUSED sockaddr_length(int af) { return (af == AF_INET) ? sizeof(struct sockaddr_in) : sizeof(struct sockaddr_in6); } static inline void -sockaddr_fill4(struct sockaddr_in *sa, ip_addr a, struct iface *ifa, uint port) +sockaddr_fill4(struct sockaddr_in *sa, ip_addr a, uint port) { memset(sa, 0, sizeof(struct sockaddr_in)); #ifdef HAVE_SIN_LEN @@ -542,7 +542,7 @@ void sockaddr_fill(sockaddr *sa, int af, ip_addr a, struct iface *ifa, uint port) { if (af == AF_INET) - sockaddr_fill4((struct sockaddr_in *) sa, a, ifa, port); + sockaddr_fill4((struct sockaddr_in *) sa, a, port); else if (af == AF_INET6) sockaddr_fill6((struct sockaddr_in6 *) sa, a, ifa, port); else @@ -550,7 +550,7 @@ sockaddr_fill(sockaddr *sa, int af, ip_addr a, struct iface *ifa, uint port) } static inline void -sockaddr_read4(struct sockaddr_in *sa, ip_addr *a, struct iface **ifa, uint *port) +sockaddr_read4(struct sockaddr_in *sa, ip_addr *a, uint *port) { *port = ntohs(sa->sin_port); *a = ipa_from_in4(sa->sin_addr); @@ -573,7 +573,7 @@ sockaddr_read(sockaddr *sa, int af, ip_addr *a, struct iface **ifa, uint *port) goto fail; if (af == AF_INET) - sockaddr_read4((struct sockaddr_in *) sa, a, ifa, port); + sockaddr_read4((struct sockaddr_in *) sa, a, port); else if (af == AF_INET6) sockaddr_read6((struct sockaddr_in6 *) sa, a, ifa, port); else @@ -770,7 +770,7 @@ sk_set_tos6(sock *s, int tos) } static inline int -sk_set_high_port(sock *s) +sk_set_high_port(sock *s UNUSED) { /* Port range setting is optional, ignore it if not supported */ |