[Spice-commits] 2 commits - configure.ac server/tests
Hans de Goede
jwrdegoede at kemper.freedesktop.org
Mon Apr 4 02:56:31 PDT 2011
configure.ac | 14 --------------
server/tests/test_util.h | 2 --
2 files changed, 16 deletions(-)
New commits:
commit d3463ae9af161fe70fefa043bb59b61b331715a9
Author: Christophe Fergeau <cfergeau at gmail.com>
Date: Fri Apr 1 18:19:12 2011 +0200
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
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)
commit 5dd6932bf78080764a1b31bd1e72de5917eb4053
Author: Christophe Fergeau <cfergeau at redhat.com>
Date: Fri Apr 1 16:47:12 2011 +0200
remove duplicated macro
MIN() is already defined in spice-protocol/spice/macros.h
diff --git a/server/tests/test_util.h b/server/tests/test_util.h
index 5344a4f..ac1442d 100644
--- a/server/tests/test_util.h
+++ b/server/tests/test_util.h
@@ -9,6 +9,4 @@
abort(); \
}
-#define MIN(a,b) ((a) > (b) ? (b) : (a))
-
#endif // __TEST_UTIL_H__
More information about the Spice-commits
mailing list