Re: [PATCH v4 0/2] Replaced locks with lock guard macros

2020-03-30 Thread Peter Maydell
On Mon, 30 Mar 2020 at 06:54, Daniel Brodsky wrote: > Using `#pragma clang diagnostic ignored > "-Wtautological-type-limit-compare"` suppresses the errors (on Clang > 9). I could go and drop that in for the problem areas? There's only a > few so it wouldn't be a major change. I'm thinking of

Re: [PATCH v4 0/2] Replaced locks with lock guard macros

2020-03-29 Thread Daniel Brodsky
On Sat, Mar 28, 2020 at 9:12 AM Richard Henderson wrote: > > On 3/27/20 11:38 PM, Daniel Brodsky wrote: > > On Thu, Mar 26, 2020 at 11:01 AM Richard Henderson > > wrote: > >> > >> My preference is to add -Wno-tautological-type-limit-compare in > >> configure, so we don't have to work around this

Re: [PATCH v4 0/2] Replaced locks with lock guard macros

2020-03-28 Thread Richard Henderson
On 3/27/20 11:38 PM, Daniel Brodsky wrote: > On Thu, Mar 26, 2020 at 11:01 AM Richard Henderson > wrote: >> >> My preference is to add -Wno-tautological-type-limit-compare in >> configure, so we don't have to work around this same issue elsewhere >> in the code base. >> >> r~ > > What do you

Re: [PATCH v4 0/2] Replaced locks with lock guard macros

2020-03-28 Thread Daniel Brodsky
On Thu, Mar 26, 2020 at 11:01 AM Richard Henderson wrote: > > My preference is to add -Wno-tautological-type-limit-compare in > configure, so we don't have to work around this same issue elsewhere > in the code base. > > r~ What do you think would be the best way to add this? I could change all

Re: [PATCH v4 0/2] Replaced locks with lock guard macros

2020-03-26 Thread Richard Henderson
On Wed, 25 Mar 2020 at 04:35, Daniel Brodsky wrote: > > There may be ways to rewrite that expression to avoid triggering the > > warning on a 32-bit platform. Untested, but does this help: > > > > if (sizeof(mask) > 4 && mask <= 0xu) { > > > > -- > > Eric Blake, Principal Software

Re: [PATCH v4 0/2] Replaced locks with lock guard macros

2020-03-25 Thread Daniel Brodsky
> > There may be ways to rewrite that expression to avoid triggering the > warning on a 32-bit platform. Untested, but does this help: > > if (sizeof(mask) > 4 && mask <= 0xu) { > > -- > Eric Blake, Principal Software Engineer > Red Hat, Inc. +1-919-301-3226 > Virtualization:

Re: [PATCH v4 0/2] Replaced locks with lock guard macros

2020-03-24 Thread Eric Blake
You can test locally by building with clang (llvm) instead of gcc: ./configure --cc=clang Using --cc=clang is causing the following error in several different places: qemu/target/ppc/translate.c:1894:18: error: result of comparison 'target_ulong' (aka 'unsigned int') <= 4294967295 is

Re: [PATCH v4 0/2] Replaced locks with lock guard macros

2020-03-23 Thread Richard Henderson
On 3/23/20 2:46 PM, Daniel Brodsky wrote: > On Mon, Mar 23, 2020 at 6:25 AM Stefan Hajnoczi wrote: >> >> On Fri, Mar 20, 2020 at 06:43:23AM -0700, no-re...@patchew.org wrote: >>> /tmp/qemu-test/src/util/thread-pool.c:213:5: error: unused variable >>> 'qemu_lockable_auto1'

Re: [PATCH v4 0/2] Replaced locks with lock guard macros

2020-03-23 Thread Daniel Brodsky
On Mon, Mar 23, 2020 at 6:25 AM Stefan Hajnoczi wrote: > > On Fri, Mar 20, 2020 at 06:43:23AM -0700, no-re...@patchew.org wrote: > > /tmp/qemu-test/src/util/thread-pool.c:213:5: error: unused variable > > 'qemu_lockable_auto1' [-Werror,-Wunused-variable] > > QEMU_LOCK_GUARD(>lock); > > ^

Re: [PATCH v4 0/2] Replaced locks with lock guard macros

2020-03-23 Thread Stefan Hajnoczi
On Fri, Mar 20, 2020 at 06:43:23AM -0700, no-re...@patchew.org wrote: > /tmp/qemu-test/src/util/thread-pool.c:213:5: error: unused variable > 'qemu_lockable_auto1' [-Werror,-Wunused-variable] > QEMU_LOCK_GUARD(>lock); > ^ > /tmp/qemu-test/src/include/qemu/lockable.h:173:29: note: expanded

Re: [PATCH v4 0/2] Replaced locks with lock guard macros

2020-03-20 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20200320123137.1937091-1-dnbrd...@gmail.com/ Hi, This series failed the asan build test. Please find the testing commands and their output below. If you have Docker installed, you can probably reproduce it locally. === TEST SCRIPT BEGIN === #!/bin/bash

[PATCH v4 0/2] Replaced locks with lock guard macros

2020-03-20 Thread dnbrdsky
From: Daniel Brodsky This patch set adds: - a fix for lock guard macros so they can be used multiple times in the same function - replacement of locks with lock guards where appropriate v3 -> v4: - removed unneeded unlocks from areas where lock guards are now used - dropped change to lock guard