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 --- configure.ac | 14 -------------- 1 files changed, 0 insertions(+), 14 deletions(-)
diff --git a/configure.ac b/configure.ac index 5580a5d..0a4e734 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) -- 1.7.4.2 _______________________________________________ Spice-devel mailing list Spice-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/spice-devel