qemu-ppc
[Top][All Lists]
Advanced

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

Re: [Qemu-ppc] [Qemu-devel] [PATCH] Annotate questionable fallthroughs


From: Markus Armbruster
Subject: Re: [Qemu-ppc] [Qemu-devel] [PATCH] Annotate questionable fallthroughs
Date: Mon, 21 Jan 2013 11:36:56 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1 (gnu/linux)

Peter Maydell <address@hidden> writes:

> On 20 January 2013 15:54, Blue Swirl <address@hidden> wrote:
[...]
> I don't think there's much point adding tons of "XXX" comments
> when a bunch of these aren't actually wrong code.

Moreover, such comments make them look intentional to static analyzers.
I doubt lying to our tools is a good idea.

>                                                   If you want to fix
> this I think a better approach would be more focused patches aimed
> at adding 'break;' or "/* fallthrough */" based on actual human
> examination of the surrounding code.

Indeed.  I'd gladly provide a list of fall throughs Coverity dislikes.

Additionally, I'd suggest to enforce a suitable convention for new code.
I find this one sensible: either "break;" or "/* fall through */" is
required, except right after a case label, a goto, continue, or return
statement, or function call that never returns.



reply via email to

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