qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Daniel Brodsky
Subject: Re: [PATCH v4 0/2] Replaced locks with lock guard macros
Date: Wed, 25 Mar 2020 04:35:09 -0700

>
> 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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]