From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:42932) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SpiOR-0006mi-9w for qemu-devel@nongnu.org; Fri, 13 Jul 2012 12:07:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SpiON-0002H7-29 for qemu-devel@nongnu.org; Fri, 13 Jul 2012 12:06:59 -0400 Received: from mx1.redhat.com ([209.132.183.28]:21335) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SpiOM-0002Gw-Po for qemu-devel@nongnu.org; Fri, 13 Jul 2012 12:06:54 -0400 Message-ID: <5000479A.1060001@redhat.com> Date: Fri, 13 Jul 2012 18:06:50 +0200 From: Kevin Wolf MIME-Version: 1.0 References: <1342103249-20888-2-git-send-email-kwolf@redhat.com> <1342193500-5708-1-git-send-email-kwolf@redhat.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v2 1/2] coroutine-ucontext: Help valgrind understand coroutines List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: qemu-devel@nongnu.org Am 13.07.2012 17:37, schrieb Peter Maydell: > On 13 July 2012 16:31, Kevin Wolf wrote: >> +#ifdef CONFIG_VALGRIND_H >> +/* Work around an unused variable in the valgrind.h macro... */ >> +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" >> +static inline void valgrind_stack_deregister(CoroutineUContext *co) >> +{ >> + VALGRIND_STACK_DEREGISTER(co->valgrind_stack_id); >> +} >> +#pragma GCC diagnostic error "-Wunused-but-set-variable" >> +#endif > > '#pragma .. error' will defeat the configure code which makes warnings > not fatal in release builds. I know. What's your suggestion? Switch only to warning? Then it would be easy to miss warnings. Disabling the valgrind code for gcc < 4.6 is better, but still not really nice. I thought having part of one file always use -Werror for this one warning is the best compromise, but I won't insist on it. Kevin