From: Aki Tuomi Date: Mon, 7 Nov 2016 21:27:01 +0000 (+0200) Subject: m4: Fix compiler warnings X-Git-Tag: 2.3.0.rc1~2680 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=9c257ae400f8a075946a7457b45b2ff0a455ee21;p=thirdparty%2Fdovecot%2Fcore.git m4: Fix compiler warnings Makes it work with -Wall -W -Werror --- diff --git a/m4/fd_passing.m4 b/m4/fd_passing.m4 index 79a44143c7..6b96c0fb94 100644 --- a/m4/fd_passing.m4 +++ b/m4/fd_passing.m4 @@ -17,13 +17,14 @@ AC_DEFUN([DOVECOT_FD_PASSING], [ #include #include "fdpass.h" + static int nopen(void) { int i, n; struct stat sb; for (i = n = 0; i < 256; i++) if (fstat(i, &sb) == 0) n++; - return n; + return n; } int main(void) { diff --git a/m4/ipv6.m4 b/m4/ipv6.m4 index 4e6ab46d01..02c400eb33 100644 --- a/m4/ipv6.m4 +++ b/m4/ipv6.m4 @@ -12,7 +12,7 @@ AC_DEFUN([DOVECOT_IPV6], [ #include #include #include ]], - [[struct in6_addr i;]])], + [[struct in6_addr i; (void)i;]])], [i_cv_type_in6_addr=yes], [i_cv_type_in6_addr=no])]) if test $i_cv_type_in6_addr = yes; then diff --git a/m4/unsetenv.m4 b/m4/unsetenv.m4 index 0c469e8809..e02b57cf4b 100644 --- a/m4/unsetenv.m4 +++ b/m4/unsetenv.m4 @@ -3,7 +3,7 @@ AC_DEFUN([DOVECOT_UNSETENV_RET_INT], [ AC_TRY_COMPILE([ #include ], [ - if (unsetenv("env") < 0) ; + if (unsetenv("env") < 0) { } ], [ i_cv_unsetenv_ret_int=yes ], [