[PATCH 0/6] Fix more GCC9 -O3 warnings

Philippe Mathieu-Daudé posted 6 patches 4 years, 4 months ago
Only 0 patches received!
There is a newer version of this series
audio/audio.c           | 1 +
hw/display/tcx.c        | 2 ++
hw/net/imx_fec.c        | 8 +++++---
hw/scsi/megasas.c       | 3 ++-
hw/timer/aspeed_timer.c | 2 +-
qemu-io-cmds.c          | 1 +
6 files changed, 12 insertions(+), 5 deletions(-)
[PATCH 0/6] Fix more GCC9 -O3 warnings
Posted by Philippe Mathieu-Daudé 4 years, 4 months ago
Fix some trivial warnings when building with -O3.

Philippe Mathieu-Daudé (6):
  audio/audio: Add missing fall through comment
  hw/display/tcx: Add missing fall through comments
  hw/net/imx_fec: Rewrite fall through comments
  hw/timer/aspeed_timer: Add a fall through comment
  hw/scsi/megasas: Silent GCC9 duplicated-cond warning
  qemu-io-cmds: Silent GCC9 format-overflow warning

 audio/audio.c           | 1 +
 hw/display/tcx.c        | 2 ++
 hw/net/imx_fec.c        | 8 +++++---
 hw/scsi/megasas.c       | 3 ++-
 hw/timer/aspeed_timer.c | 2 +-
 qemu-io-cmds.c          | 1 +
 6 files changed, 12 insertions(+), 5 deletions(-)

-- 
2.21.0


Re: [PATCH 0/6] Fix more GCC9 -O3 warnings
Posted by Philippe Mathieu-Daudé 4 years, 4 months ago
On 12/17/19 6:32 PM, Philippe Mathieu-Daudé wrote:
> Fix some trivial warnings when building with -O3.
> 
> Philippe Mathieu-Daudé (6):
>    audio/audio: Add missing fall through comment
>    hw/display/tcx: Add missing fall through comments
>    hw/net/imx_fec: Rewrite fall through comments
>    hw/timer/aspeed_timer: Add a fall through comment
>    hw/scsi/megasas: Silent GCC9 duplicated-cond warning
>    qemu-io-cmds: Silent GCC9 format-overflow warning

Sorry, this series failed because I used this tag in the first patch:

Cc: Kővágó, Zoltán <dirty.ice.hu@gmail.com>

Then git-send-email was happy with --dry-run, but then failed:
(body) Adding cc: Kővágó, Zoltán <dirty.ice.hu@gmail.com> from line 'Cc: 
Kővágó, Zoltán <dirty.ice.hu@gmail.com>'
5.1.1 <K  v  g  >: Recipient address rejected: User unknown in local 
recipient table

Note to self, enclose utf-8 names, as:
Cc: "Kővágó, Zoltán" <dirty.ice.hu@gmail.com>


Re: [PATCH 0/6] Fix more GCC9 -O3 warnings
Posted by Alex Bennée 4 years, 3 months ago
Philippe Mathieu-Daudé <philmd@redhat.com> writes:

> On 12/17/19 6:32 PM, Philippe Mathieu-Daudé wrote:
>> Fix some trivial warnings when building with -O3.
>> Philippe Mathieu-Daudé (6):
>>    audio/audio: Add missing fall through comment
>>    hw/display/tcx: Add missing fall through comments
>>    hw/net/imx_fec: Rewrite fall through comments
>>    hw/timer/aspeed_timer: Add a fall through comment
>>    hw/scsi/megasas: Silent GCC9 duplicated-cond warning
>>    qemu-io-cmds: Silent GCC9 format-overflow warning
>
> Sorry, this series failed because I used this tag in the first patch:
>
> Cc: Kővágó, Zoltán <dirty.ice.hu@gmail.com>
>
> Then git-send-email was happy with --dry-run, but then failed:
> (body) Adding cc: Kővágó, Zoltán <dirty.ice.hu@gmail.com> from line
> 'Cc: Kővágó, Zoltán <dirty.ice.hu@gmail.com>'
> 5.1.1 <K  v  g  >: Recipient address rejected: User unknown in local
> recipient table
>
> Note to self, enclose utf-8 names, as:
> Cc: "Kővágó, Zoltán" <dirty.ice.hu@gmail.com>

I never have to with my tags:

Cc: Alex Bennée <alex.bennee@linaro.org>

Is it possible to be more even utf-8? Sounds like a bug in the git tools
to me.

-- 
Alex Bennée

Re: [PATCH 0/6] Fix more GCC9 -O3 warnings
Posted by Philippe Mathieu-Daudé 4 years, 3 months ago
On 1/23/20 12:28 PM, Alex Bennée wrote:
> Philippe Mathieu-Daudé <philmd@redhat.com> writes:
> 
>> On 12/17/19 6:32 PM, Philippe Mathieu-Daudé wrote:
>>> Fix some trivial warnings when building with -O3.
>>> Philippe Mathieu-Daudé (6):
>>>     audio/audio: Add missing fall through comment
>>>     hw/display/tcx: Add missing fall through comments
>>>     hw/net/imx_fec: Rewrite fall through comments
>>>     hw/timer/aspeed_timer: Add a fall through comment
>>>     hw/scsi/megasas: Silent GCC9 duplicated-cond warning
>>>     qemu-io-cmds: Silent GCC9 format-overflow warning
>>
>> Sorry, this series failed because I used this tag in the first patch:
>>
>> Cc: Kővágó, Zoltán <dirty.ice.hu@gmail.com>
>>
>> Then git-send-email was happy with --dry-run, but then failed:
>> (body) Adding cc: Kővágó, Zoltán <dirty.ice.hu@gmail.com> from line
>> 'Cc: Kővágó, Zoltán <dirty.ice.hu@gmail.com>'
>> 5.1.1 <K  v  g  >: Recipient address rejected: User unknown in local
>> recipient table
>>
>> Note to self, enclose utf-8 names, as:
>> Cc: "Kővágó, Zoltán" <dirty.ice.hu@gmail.com>
> 
> I never have to with my tags:
> 
> Cc: Alex Bennée <alex.bennee@linaro.org>
> 
> Is it possible to be more even utf-8? Sounds like a bug in the git tools
> to me.

The problem is the comma.
What do you mean by "more UTF-8"?


Re: [PATCH 0/6] Fix more GCC9 -O3 warnings
Posted by Alex Bennée 4 years, 3 months ago
Philippe Mathieu-Daudé <philmd@redhat.com> writes:

> On 1/23/20 12:28 PM, Alex Bennée wrote:
>> Philippe Mathieu-Daudé <philmd@redhat.com> writes:
>> 
>>> On 12/17/19 6:32 PM, Philippe Mathieu-Daudé wrote:
>>>> Fix some trivial warnings when building with -O3.
>>>> Philippe Mathieu-Daudé (6):
>>>>     audio/audio: Add missing fall through comment
>>>>     hw/display/tcx: Add missing fall through comments
>>>>     hw/net/imx_fec: Rewrite fall through comments
>>>>     hw/timer/aspeed_timer: Add a fall through comment
>>>>     hw/scsi/megasas: Silent GCC9 duplicated-cond warning
>>>>     qemu-io-cmds: Silent GCC9 format-overflow warning
>>>
>>> Sorry, this series failed because I used this tag in the first patch:
>>>
>>> Cc: Kővágó, Zoltán <dirty.ice.hu@gmail.com>
>>>
>>> Then git-send-email was happy with --dry-run, but then failed:
>>> (body) Adding cc: Kővágó, Zoltán <dirty.ice.hu@gmail.com> from line
>>> 'Cc: Kővágó, Zoltán <dirty.ice.hu@gmail.com>'
>>> 5.1.1 <K  v  g  >: Recipient address rejected: User unknown in local
>>> recipient table
>>>
>>> Note to self, enclose utf-8 names, as:
>>> Cc: "Kővágó, Zoltán" <dirty.ice.hu@gmail.com>
>> I never have to with my tags:
>> Cc: Alex Bennée <alex.bennee@linaro.org>
>> Is it possible to be more even utf-8? Sounds like a bug in the git
>> tools
>> to me.
>
> The problem is the comma.
> What do you mean by "more UTF-8"?

It was a joke - I think you are either utf-8 clean or not. Now the
question is should the tools have slurped the coma as part of the name?
Is it a localisation issue?

-- 
Alex Bennée

Re: [PATCH 0/6] Fix more GCC9 -O3 warnings
Posted by Chubb, Peter (Data61, Kensington NSW) 4 years, 4 months ago
>>>>> "Philippe" == Philippe Mathieu-Daudé <philmd@redhat.com> writes:

Philippe> Fix some trivial warnings when building with -O3.

For compatibility with lint and other older checkers, it'd be good to keep
this as /* FALLTHROUGH */ (which gcc should accept according to its
manual).

Fixing the comments' placement is a different matter, and should be
done.  Seems to me that until gcc started warning for this, noone had
actually run a checker, and the comments were just for human info.

Peter C
-- 
Dr Peter Chubb         Tel: +61 2 9490 5852      http://ts.data61.csiro.au/
Trustworthy Systems Group                           Data61 (formerly NICTA)
Re: [PATCH 0/6] Fix more GCC9 -O3 warnings
Posted by Markus Armbruster 4 years, 4 months ago
"Chubb, Peter (Data61, Kensington NSW)" <Peter.Chubb@data61.csiro.au>
writes:

>>>>>> "Philippe" == Philippe Mathieu-Daudé <philmd@redhat.com> writes:
>
> Philippe> Fix some trivial warnings when building with -O3.
>
> For compatibility with lint and other older checkers, it'd be good to keep
> this as /* FALLTHROUGH */ (which gcc should accept according to its
> manual).

We have hundreds of /* fall through */ comments already.

> Fixing the comments' placement is a different matter, and should be
> done.  Seems to me that until gcc started warning for this, noone had
> actually run a checker, and the comments were just for human info.
>
> Peter C


Re: [PATCH 0/6] Fix more GCC9 -O3 warnings
Posted by Paolo Bonzini 4 years, 3 months ago
On 18/12/19 07:05, Markus Armbruster wrote:
> "Chubb, Peter (Data61, Kensington NSW)" <Peter.Chubb@data61.csiro.au>
> writes:
> 
>>>>>>> "Philippe" == Philippe Mathieu-Daudé <philmd@redhat.com> writes:
>>
>> Philippe> Fix some trivial warnings when building with -O3.
>>
>> For compatibility with lint and other older checkers, it'd be good to keep
>> this as /* FALLTHROUGH */ (which gcc should accept according to its
>> manual).
> 
> We have hundreds of /* fall through */ comments already.
> 
>> Fixing the comments' placement is a different matter, and should be
>> done.  Seems to me that until gcc started warning for this, noone had
>> actually run a checker, and the comments were just for human info.
>>
>> Peter C
> 

Queued, thanks.

Paolo


Re: [PATCH 0/6] Fix more GCC9 -O3 warnings
Posted by Philippe Mathieu-Daudé 4 years, 3 months ago
Hi Paolo,

On 1/18/20 8:24 PM, Paolo Bonzini wrote:
> On 18/12/19 07:05, Markus Armbruster wrote:
>> "Chubb, Peter (Data61, Kensington NSW)" <Peter.Chubb@data61.csiro.au>
>> writes:
>>
>>>>>>>> "Philippe" == Philippe Mathieu-Daudé <philmd@redhat.com> writes:
>>>
>>> Philippe> Fix some trivial warnings when building with -O3.
>>>
>>> For compatibility with lint and other older checkers, it'd be good to keep
>>> this as /* FALLTHROUGH */ (which gcc should accept according to its
>>> manual).
>>
>> We have hundreds of /* fall through */ comments already.
>>
>>> Fixing the comments' placement is a different matter, and should be
>>> done.  Seems to me that until gcc started warning for this, noone had
>>> actually run a checker, and the comments were just for human info.
>>>
>>> Peter C
>>
> 
> Queued, thanks.

Thanks, but I sent a v2 (20191218192526.13845-1-philmd@redhat.com) with:

- addressed Thomas and Aleksandar comments
- dropped 'hw/scsi/megasas: Silent GCC9 duplicated-cond warning'
- dropped 'qemu-io-cmds: Silent GCC9 format-overflow warning'

See:
https://www.mail-archive.com/qemu-devel@nongnu.org/msg666280.html

Can you queue it instead?


Re: [PATCH 0/6] Fix more GCC9 -O3 warnings
Posted by Paolo Bonzini 4 years, 3 months ago
On 20/01/20 20:02, Philippe Mathieu-Daudé wrote:
> Hi Paolo,
> 
> On 1/18/20 8:24 PM, Paolo Bonzini wrote:
>> On 18/12/19 07:05, Markus Armbruster wrote:
>>> "Chubb, Peter (Data61, Kensington NSW)" <Peter.Chubb@data61.csiro.au>
>>> writes:
>>>
>>>>>>>>> "Philippe" == Philippe Mathieu-Daudé <philmd@redhat.com> writes:
>>>>
>>>> Philippe> Fix some trivial warnings when building with -O3.
>>>>
>>>> For compatibility with lint and other older checkers, it'd be good
>>>> to keep
>>>> this as /* FALLTHROUGH */ (which gcc should accept according to its
>>>> manual).
>>>
>>> We have hundreds of /* fall through */ comments already.
>>>
>>>> Fixing the comments' placement is a different matter, and should be
>>>> done.  Seems to me that until gcc started warning for this, noone had
>>>> actually run a checker, and the comments were just for human info.
>>>>
>>>> Peter C
>>>
>>
>> Queued, thanks.
> 
> Thanks, but I sent a v2 (20191218192526.13845-1-philmd@redhat.com) with:
> 
> - addressed Thomas and Aleksandar comments
> - dropped 'hw/scsi/megasas: Silent GCC9 duplicated-cond warning'
> - dropped 'qemu-io-cmds: Silent GCC9 format-overflow warning'
> 
> See:
> https://www.mail-archive.com/qemu-devel@nongnu.org/msg666280.html
> 
> Can you queue it instead?

Yes, I replaced it.

Paolo