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