[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 1/1] hw/audio/sb16.c: missing break statement
From: |
Daniel P . Berrangé |
Subject: |
Re: [Qemu-devel] [PATCH 1/1] hw/audio/sb16.c: missing break statement |
Date: |
Thu, 8 Feb 2018 13:08:49 +0000 |
User-agent: |
Mutt/1.9.1 (2017-09-22) |
On Thu, Feb 08, 2018 at 09:15:10AM -0300, Philippe Mathieu-Daudé wrote:
> Hi Daniel,
>
> On 02/08/2018 07:57 AM, Daniel Henrique Barboza wrote:
> > This patch adds a break in the switch() statement of complete(),
> > value 0x42:
> >
> > case 0x42: /* FT2 sets output freq with this, go figure */
> > qemu_log_mask(LOG_UNIMP, "cmd 0x42 might not do what it think it"
> > " should\n");
> > break; <-------
> > case 0x41:
>
> It seems this is an intentional fallthrough, I understand cmd 0x42 is
> expected to do the same of 0x41 and _a bit more_ (see commit 85571bc7415).
It might be nice to turn on -Wimplicit-fallthrough and then annotate
valid locations like this in qemu with /* fallthrough */
Although GCC has an __attribute((fallthrough)), the warning flag impl
also looks for that magic comment, and the magic comment is portable
to clang too.
Regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|