mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice
synced 2026-01-08 21:14:11 +00:00
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
This commit is contained in:
parent
5dd6932bf7
commit
d3463ae9af
14
configure.ac
14
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)
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user