[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v4 0/2] Replaced locks with lock guard macros
From: |
Richard Henderson |
Subject: |
Re: [PATCH v4 0/2] Replaced locks with lock guard macros |
Date: |
Thu, 26 Mar 2020 11:01:05 -0700 |
On Wed, 25 Mar 2020 at 04:35, Daniel Brodsky <address@hidden> 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 <= 0xffffffffu) {
> >
> > --
> > Eric Blake, Principal Software Engineer
> > Red Hat, Inc. +1-919-301-3226
> > Virtualization: qemu.org | libvirt.org
> >
> Unfortunately, the compiler still catches that the statement is always
> true for 32-bit.
> An alternative might be to convert cases like this to a macro instead,
> which doesn't
> cause any errors.
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~
- [PATCH v4 1/2] lockable: fix __COUNTER__ macro to be referenced properly, (continued)
- [PATCH v4 1/2] lockable: fix __COUNTER__ macro to be referenced properly, dnbrdsky, 2020/03/20
- [PATCH v4 2/2] lockable: replaced locks with lock guard macros where appropriate, dnbrdsky, 2020/03/20
- Re: [PATCH v4 0/2] Replaced locks with lock guard macros, no-reply, 2020/03/20
- Re: [PATCH v4 0/2] Replaced locks with lock guard macros, Stefan Hajnoczi, 2020/03/23
- Re: [PATCH v4 0/2] Replaced locks with lock guard macros, Daniel Brodsky, 2020/03/23
- Re: [PATCH v4 0/2] Replaced locks with lock guard macros, Richard Henderson, 2020/03/23
- Re: [PATCH v4 0/2] Replaced locks with lock guard macros, Eric Blake, 2020/03/24
- Re: [PATCH v4 0/2] Replaced locks with lock guard macros, Daniel Brodsky, 2020/03/25
- Re: [PATCH v4 0/2] Replaced locks with lock guard macros,
Richard Henderson <=
- Re: [PATCH v4 0/2] Replaced locks with lock guard macros, Daniel Brodsky, 2020/03/28
- Re: [PATCH v4 0/2] Replaced locks with lock guard macros, Richard Henderson, 2020/03/28
- Re: [PATCH v4 0/2] Replaced locks with lock guard macros, Daniel Brodsky, 2020/03/30
- Re: [PATCH v4 0/2] Replaced locks with lock guard macros, Peter Maydell, 2020/03/30