summaryrefslogtreecommitdiff
path: root/compiler.h
diff options
context:
space:
mode:
authorStefan Weil <weil@mail.berlios.de>2011-09-16 22:03:08 +0200
committerAnthony Liguori <aliguori@us.ibm.com>2011-09-23 11:51:05 -0500
commit87751797c707092108700159b570e917bae346b9 (patch)
tree70b65a713f038ac2d7570f4642759f7aa4e7c87e /compiler.h
parentf8b72754c21789293eb655641459ab43ebd69c66 (diff)
downloadqemu-87751797c707092108700159b570e917bae346b9.tar.gz
qemu-87751797c707092108700159b570e917bae346b9.tar.bz2
qemu-87751797c707092108700159b570e917bae346b9.zip
Fix and clean code which tests the gcc version
The code which tests whether gcc supports warn_unused_result was wrong. Remove the wrong test from configure and replace it by code using macro QEMU_GNUC_PREREQ in compiler.h. Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'compiler.h')
-rw-r--r--compiler.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler.h b/compiler.h
index 3a9b8a174b..a1c0794947 100644
--- a/compiler.h
+++ b/compiler.h
@@ -18,7 +18,7 @@
#define QEMU_NORETURN __attribute__ ((__noreturn__))
-#ifdef CONFIG_GCC_ATTRIBUTE_WARN_UNUSED_RESULT
+#if QEMU_GNUC_PREREQ(3, 4)
#define QEMU_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
#else
#define QEMU_WARN_UNUSED_RESULT