From: Stefan Weil <sw@weilnetz.de>
To: Alexander Graf <agraf@suse.de>
Cc: qemu-devel <qemu-devel@nongnu.org>,
David Gibson <david@gibson.dropbear.id.au>
Subject: Re: [Qemu-devel] [PATCH 3/3] spapr: Fix compiler warning for some versions of gcc (spapr_io_read)
Date: Tue, 02 Jul 2013 22:22:46 +0200 [thread overview]
Message-ID: <51D33696.7030609@weilnetz.de> (raw)
In-Reply-To: <51D2CB63.1020308@suse.de>
Am 02.07.2013 14:45, schrieb Alexander Graf:
> On 06/24/2013 07:48 PM, Stefan Weil wrote:
>> i686-w64-mingw32-gcc (GCC) 4.6.3 from Debian wheezy reports this
>> warning:
>>
>> hw/ppc/spapr_pci.c:454:1: warning:
>> control reaches end of non-void function [-Wreturn-type]
>>
>> Adding a default case to the switch statement satisfies the compiler.
>> This modification requires moving the assert statement.
>>
>> Signed-off-by: Stefan Weil<sw@weilnetz.de>
>> ---
>> hw/ppc/spapr_pci.c | 3 ++-
>> 1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/hw/ppc/spapr_pci.c b/hw/ppc/spapr_pci.c
>> index 04e8362..c04086c 100644
>> --- a/hw/ppc/spapr_pci.c
>> +++ b/hw/ppc/spapr_pci.c
>> @@ -448,9 +448,10 @@ static uint64_t spapr_io_read(void *opaque,
>> hwaddr addr,
>> case 2:
>> return cpu_inw(addr);
>> case 4:
>> + default:
>> + assert(size == 4);
>> return cpu_inl(addr);
>
> Please fix this one up with g_assert_not_reached() as well.
>
> Alex
I did, and you applied it to ppc-next. :-)
See http://patchwork.ozlabs.org/patch/255738/.
Cheers
Stefan
next prev parent reply other threads:[~2013-07-02 20:22 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-24 17:48 [Qemu-devel] [PATCH 0/3] spapr: Fix remaining compiler warnings Stefan Weil
2013-06-24 17:48 ` [Qemu-devel] [PATCH 1/3] spapr: Use named enum for function remove_hpte Stefan Weil
2013-07-02 12:45 ` Alexander Graf
2013-06-24 17:48 ` [Qemu-devel] [PATCH 2/3] spapr: Fix compiler warning for some versions of gcc (h_remove) Stefan Weil
2013-06-24 20:27 ` Paolo Bonzini
2013-06-24 20:35 ` Stefan Weil
2013-06-24 21:07 ` Paolo Bonzini
2013-06-24 17:48 ` [Qemu-devel] [PATCH 3/3] spapr: Fix compiler warning for some versions of gcc (spapr_io_read) Stefan Weil
2013-07-02 12:45 ` Alexander Graf
2013-07-02 20:22 ` Stefan Weil [this message]
2013-07-02 20:25 ` Alexander Graf
2013-06-26 8:14 ` [Qemu-devel] [PATCH 0/3] spapr: Fix remaining compiler warnings Paolo Bonzini
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=51D33696.7030609@weilnetz.de \
--to=sw@weilnetz.de \
--cc=agraf@suse.de \
--cc=david@gibson.dropbear.id.au \
--cc=qemu-devel@nongnu.org \
/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).