From: Stefan Weil <sw@weilnetz.de>
To: "Richard W.M. Jones" <rjones@redhat.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] Remove unnecessary break statements
Date: Sat, 25 May 2013 07:44:20 +0200 [thread overview]
Message-ID: <51A04FB4.7000908@weilnetz.de> (raw)
In-Reply-To: <20130524123310.GA20470@redhat.com>
Am 24.05.2013 14:33, schrieb Richard W.M. Jones:
> On Fri, May 24, 2013 at 12:19:25PM +0200, Stefan Weil wrote:
>> Fix these warnings from cppcheck:
>>
>> hw/display/cirrus_vga.c:2603:
>> hw/sd/sd.c:348:
>> hw/timer/exynos4210_mct.c:1033:
>> target-arm/translate.c:9886:
>> target-s390x/mem_helper.c:518:
>> target-unicore32/translate.c:1936:
>> style: Consecutive return, break, continue, goto or throw statements are unnecessary.
> I'm not sure what cppcheck does, but I spotted an unnecessary break
> statement in the watchdog code a few days ago:
>
> http://git.qemu.org/?p=qemu.git;a=blob;f=hw/watchdog/watchdog.c;h=cb4e1f9e479f934532fcd4d07528feccba812b79;hb=HEAD#l131
> (line 131)
>
> So it's obviously not finding them all :-(
>
> Rich.
Yes, cppcheck knows functions with attribute noreturn, but does not
check for statements after such functions. That's a missing feature
(or a bug).
Stefan
next prev parent reply other threads:[~2013-05-25 5:44 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-24 10:19 [Qemu-trivial] [PATCH] Remove unnecessary break statements Stefan Weil
2013-05-24 10:19 ` [Qemu-devel] " Stefan Weil
2013-05-24 10:21 ` [Qemu-trivial] " Peter Maydell
2013-05-24 10:21 ` [Qemu-devel] " Peter Maydell
2013-05-24 11:40 ` [Qemu-trivial] " Andreas Färber
2013-05-24 11:40 ` Andreas Färber
2013-05-24 12:33 ` [Qemu-trivial] " Richard W.M. Jones
2013-05-24 12:33 ` Richard W.M. Jones
2013-05-25 5:44 ` Stefan Weil [this message]
2013-05-25 9:23 ` [Qemu-trivial] " Michael Tokarev
2013-05-25 9:23 ` [Qemu-devel] " Michael Tokarev
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=51A04FB4.7000908@weilnetz.de \
--to=sw@weilnetz.de \
--cc=qemu-devel@nongnu.org \
--cc=rjones@redhat.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.