qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Peter Maydell <peter.maydell@linaro.org>
To: Richard Henderson <rth@twiddle.net>
Cc: Richard Henderson <richard.henderson@linaro.org>,
	QEMU Developers <qemu-devel@nongnu.org>
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	[thread overview]
Message-ID: <CAFEAcA8cj7d7PEYVK5B0nerhBkbaBvCWsDN1fp03wfd-chJRjA@mail.gmail.com> (raw)
In-Reply-To: <659ad21b-5c17-a194-6104-fe4f50e58009@twiddle.net>

On 7 December 2017 at 14:43, Richard Henderson <rth@twiddle.net> 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	other threads:[~2017-12-07 14:57 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-05  4:48 [Qemu-devel] [PATCH v2] linux-user: Use *at functions instead of caching interp_prefix contents Richard Henderson
2017-12-05  4:53 ` no-reply
2017-12-07 13:05 ` Peter Maydell
2017-12-07 14:43   ` Richard Henderson
2017-12-07 14:57     ` Peter Maydell [this message]
2017-12-07 17:06     ` Eric Blake
2017-12-07 19:31       ` Richard Henderson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAFEAcA8cj7d7PEYVK5B0nerhBkbaBvCWsDN1fp03wfd-chJRjA@mail.gmail.com \
    --to=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.org \
    --cc=rth@twiddle.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).