qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v2] linux-user: Use *at functions instead of cac


From: Peter Maydell
Subject: Re: [Qemu-devel] [PATCH v2] linux-user: Use *at functions instead of caching interp_prefix contents
Date: Thu, 7 Dec 2017 14:57:34 +0000

On 7 December 2017 at 14:43, Richard Henderson <address@hidden> wrote:
> On 12/07/2017 05:05 AM, Peter Maydell wrote:
>> gcc doesn't like this pattern:
>>
>> /home/petmay01/linaro/qemu-from-laptop/qemu/linux-user/syscall.c: In
>> function ‘do_name_to_handle_at’:
>> /home/petmay01/linaro/qemu-from-laptop/qemu/linux-user/syscall.c:7231:13:
>> error: switch condition has boolean value [-Werror=switch-bool]
>>      switch (interp_dirfd > 0 && name[0] == '/') {
>>              ^
>>
>> It seems like an odd way to write an if().
>
> Huh.  My gcc likes it just fine.  What version are you using?
>
> It's an IF with a /* fallthru */, so there are very few
> less ugly ways to write it...

gcc (Ubuntu 5.4.0-6ubuntu1~16.04.5) 5.4.0 20160609
(for x86-64).

thanks
-- PMM



reply via email to

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