1
0
mirror of https://github.com/moparisthebest/hexchat synced 2024-11-26 03:02:17 -05:00

Fix Ubuntu build warnings by using gcc flag -Wno-unused-result

This commit is contained in:
RichardHitt 2013-04-22 11:22:04 -07:00
parent 9603248a5b
commit ba1dfabf11

View File

@ -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 *********************************************************************