summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorChristophe Fergeau <cfergeau@gmail.com>2011-04-01 18:19:12 +0200
committerHans de Goede <hdegoede@redhat.com>2011-04-04 11:59:59 +0200
commitd3463ae9af161fe70fefa043bb59b61b331715a9 (patch)
tree93a08fdd77c4635af68a71ef087670410ed86263 /configure.ac
parent5dd6932bf78080764a1b31bd1e72de5917eb4053 (diff)
downloadspice-d3463ae9af161fe70fefa043bb59b61b331715a9.tar.gz
spice-d3463ae9af161fe70fefa043bb59b61b331715a9.tar.xz
spice-d3463ae9af161fe70fefa043bb59b61b331715a9.zip
configure.ac: remove detection of WARN_UNUSED_RESULT
spice configure.ac has some code to detect if the compiler has a special attribute to tag some functions so that they generate a warning when their return value isn't checked. However, this test is broken (the gcc attribute name is "warn_unused_result", not "__warn_unused_result__" and WARN_UNUSED_RESULT is unused anyway since spice-protocol provides SPICE_GNUC_WARN_UNUSED_RESULT. Thus we can just drop that block of code from configure.ac
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac14
1 files changed, 0 insertions, 14 deletions
diff --git a/configure.ac b/configure.ac
index 5580a5d0..0a4e734a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -459,20 +459,6 @@ if test $os_win32 == "yes" ; then
AC_SUBST(WINDRES)
fi
-# We only wish to enable attribute(warn_unused_result) if we can prevent
-# gcc from generating thousands of warnings about the misapplication of the
-# attribute to void functions and variables.
-AC_MSG_CHECKING([how to enable unused result warnings])
-warn_unused_result=""
-if echo $WARN_CFLAGS | grep -e '-Wno-attributes' >/dev/null; then
- AC_TRY_COMPILE([__attribute__((__warn_unused_result__))
- int f (int i) { return i; }], [],
- [warn_unused_result="__attribute__((__warn_unused_result__))"])
-fi
-AC_DEFINE_UNQUOTED([WARN_UNUSED_RESULT], [$warn_unused_result],
- [Define to the value your compiler uses to support the warn-unused-result attribute])
-AC_MSG_RESULT([$warn_unused_result])
-
AC_SUBST(WARN_CFLAGS)
AC_SUBST(CFLAGS_CFLAGS)