aboutsummaryrefslogtreecommitdiff
path: root/coroutine-ucontext.c
diff options
context:
space:
mode:
Diffstat (limited to 'coroutine-ucontext.c')
-rw-r--r--coroutine-ucontext.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/coroutine-ucontext.c b/coroutine-ucontext.c
index e3c450b322..784081ab18 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_)
{