Merge pull request #556 from RichardHitt/ignore-unused
Fix Ubuntu build warnings by using gcc flag -Wno-unused-result
This commit is contained in:
commit
075c5dfad6
22
configure.ac
22
configure.ac
@ -811,6 +811,28 @@ if test x$unsigned_char = xyes; then
|
|||||||
CFLAGS="$CFLAGS -funsigned-char"
|
CFLAGS="$CFLAGS -funsigned-char"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
dnl does this compiler support -Wno-unused-result ?
|
||||||
|
AC_MSG_CHECKING([if gcc accepts -Wno-unused-result ])
|
||||||
|
|
||||||
|
safe_CFLAGS=$CFLAGS
|
||||||
|
CFLAGS="-Wno-unused-result"
|
||||||
|
|
||||||
|
AC_TRY_COMPILE(, [
|
||||||
|
int main () { return 0 ; }
|
||||||
|
],
|
||||||
|
[
|
||||||
|
no_unused_result=yes
|
||||||
|
AC_MSG_RESULT([yes])
|
||||||
|
], [
|
||||||
|
no_unused_result=no
|
||||||
|
AC_MSG_RESULT([no])
|
||||||
|
])
|
||||||
|
CFLAGS=$safe_CFLAGS
|
||||||
|
|
||||||
|
if test x$no_unused_result = xyes; then
|
||||||
|
CFLAGS="$CFLAGS -Wno-unused-result"
|
||||||
|
fi
|
||||||
|
|
||||||
dnl *********************************************************************
|
dnl *********************************************************************
|
||||||
dnl ** FUNCTIONS/LIBS/CFLAGS ********************************************
|
dnl ** FUNCTIONS/LIBS/CFLAGS ********************************************
|
||||||
dnl *********************************************************************
|
dnl *********************************************************************
|
||||||
|
Loading…
Reference in New Issue
Block a user