diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2012-07-30 16:13:07 +0100 |
---|---|---|
committer | Blue Swirl <blauwirbel@gmail.com> | 2012-07-31 20:04:42 +0000 |
commit | 06d71fa1487fdef03e713b9e1aed50f7dceff27b (patch) | |
tree | 28176f7ef48ed3d24b6abe7311b1e34bce9d348a /coroutine-ucontext.c | |
parent | 5e3bc7144edd6e4fa2824944e5eb16c28197dd5a (diff) | |
download | qemu-06d71fa1487fdef03e713b9e1aed50f7dceff27b.zip qemu-06d71fa1487fdef03e713b9e1aed50f7dceff27b.tar.gz qemu-06d71fa1487fdef03e713b9e1aed50f7dceff27b.tar.bz2 |
configure: Split valgrind test into pragma test and valgrind.h test
Split the configure test that checks for valgrind into two, one
part checking whether we have the gcc pragma to disable unused-but-set
variables, and the other part checking for the existence of valgrind.h.
The first of these has to be compiled with -Werror and the second
does not and shouldn't generate any warnings.
This (a) allows us to enable "make errors in configure tests be
build failures" and (b) enables use of valgrind on systems with
a gcc which doesn't know about -Wunused-but-set-varibale, like
Debian squeeze.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Diffstat (limited to 'coroutine-ucontext.c')
-rw-r--r-- | coroutine-ucontext.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/coroutine-ucontext.c b/coroutine-ucontext.c index e3c450b..784081a 100644 --- a/coroutine-ucontext.c +++ b/coroutine-ucontext.c @@ -200,14 +200,18 @@ Coroutine *qemu_coroutine_new(void) } #ifdef CONFIG_VALGRIND_H +#ifdef CONFIG_PRAGMA_DISABLE_UNUSED_BUT_SET /* Work around an unused variable in the valgrind.h macro... */ #pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#endif static inline void valgrind_stack_deregister(CoroutineUContext *co) { VALGRIND_STACK_DEREGISTER(co->valgrind_stack_id); } +#ifdef CONFIG_PRAGMA_DISABLE_UNUSED_BUT_SET #pragma GCC diagnostic error "-Wunused-but-set-variable" #endif +#endif void qemu_coroutine_delete(Coroutine *co_) { |