On 09/07/2020 12.51, Stefan Hajnoczi wrote: > On Thu, Jul 09, 2020 at 07:34:56AM +0200, Thomas Huth wrote: >> diff --git a/util/coroutine-ucontext.c b/util/coroutine-ucontext.c >> index f0b66320e1..a4e6446ed9 100644 >> --- a/util/coroutine-ucontext.c >> +++ b/util/coroutine-ucontext.c >> @@ -237,19 +237,15 @@ Coroutine *qemu_coroutine_new(void) >> } >> >> #ifdef CONFIG_VALGRIND_H >> -#if defined(CONFIG_PRAGMA_DIAGNOSTIC_AVAILABLE) && !defined(__clang__) >> /* Work around an unused variable in the valgrind.h macro... */ >> #pragma GCC diagnostic push >> #pragma GCC diagnostic ignored "-Wunused-but-set-variable" >> -#endif > > What about !defined(__clang__)? Looks like this will break clang builds: > > warning: unknown warning option '-Wunused-but-set-variable'; did you mean > '-Wunused-const-variable'? [-Wunknown-warning-option]
Oh, I didn't hit this problem in the CI: https://gitlab.com/huth/qemu/-/jobs/629814877#L2287 ... which version of Clang are you using? Anyway, I'll put the !defined(__clang__) back here, thanks for reporting it! Thomas
