Skip to contentSkip to conversation

Fix more GCC9 -O3 warnings

PATCH Applied Philippe Mathieu-Daudé 5 participants 10 messages Dec 17, 2019 – Jan 23, 2020

lore
Share & tools
lore
#0 lore raw

cover Fix more GCC9 -O3 warnings

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(-)
Signature · 1 line
2.21.0
#1 lore raw
Quoted 9 lines · Philippe Mathieu-Daudé

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 <[email protected]>

Then git-send-email was happy with --dry-run, but then failed:
(body) Adding cc: Kővágó, Zoltán <[email protected]> from line 'Cc: Kővágó, Zoltán <[email protected]>' 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" <[email protected]>

#2 lore raw
Quoted 14 lines · Philippe Mathieu-Daudé
Quoted 8 lines · Philippe Mathieu-Daudé

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 <[email protected]>
Quoted 8 lines

Then git-send-email was happy with --dry-run, but then failed:
(body) Adding cc: Kővágó, Zoltán <[email protected]> from line 'Cc: Kővágó, Zoltán <[email protected]>'
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" <[email protected]>

I never have to with my tags:

Cc Alex Bennée <[email protected]>

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

Signature · 1 line
Alex Bennée
#3 lore raw
Quoted 25 lines · Alex Bennée
Quoted 14 lines · Philippe Mathieu-Daudé
Quoted 8 lines · Philippe Mathieu-Daudé

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 <[email protected]>
Quoted 8 lines

Then git-send-email was happy with --dry-run, but then failed:
(body) Adding cc: Kővágó, Zoltán <[email protected]> from line 'Cc: Kővágó, Zoltán <[email protected]>'
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" <[email protected]>

Quoted 6 lines

I never have to with my tags:

Cc Alex Bennée <[email protected]>

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"?

#4 lore raw
Quoted 25 lines · Philippe Mathieu-Daudé
Quoted 24 lines · Alex Bennée
Quoted 22 lines · Philippe Mathieu-Daudé
Quoted 8 lines · Philippe Mathieu-Daudé

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 <[email protected]>

Then git-send-email was happy with --dry-run, but then failed:
(body) Adding cc: Kővágó, Zoltán <[email protected]> from line 'Cc: Kővágó, Zoltán <[email protected]>'
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" <[email protected]>

Quoted 8 lines
Quoted 5 lines

I never have to with my tags:
Cc: Alex Bennée <[email protected]>
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?

Signature · 1 line
Alex Bennée
#5 lore raw
In reply to Philippe Mathieu-Daudé
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Philippe" == Philippe Mathieu-Daudé <[email protected]> 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

Signature · 2 lines
Dr Peter Chubb         Tel: +61 2 9490 5852      http://ts.data61.csiro.au/
Trustworthy Systems Group                           Data61 (formerly NICTA)
#6 lore raw

"Chubb, Peter (Data61, Kensington NSW)" <[email protected]>

Quoted 7 lines · writes:
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Philippe" == Philippe Mathieu-Daudé <[email protected]> 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.

Quoted 5 lines

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

#7 lore raw
Quoted 5 lines · Markus Armbruster

"Chubb, Peter (Data61, Kensington NSW)" <[email protected]>

Quoted 2 lines · writes:
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Philippe" == Philippe Mathieu-Daudé <[email protected]> writes:

Quoted 14 lines
Quoted 5 lines

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.

Quoted 5 lines

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

#8 lore raw

Hi Paolo,

Quoted 14 lines · Paolo Bonzini
Quoted 13 lines · Markus Armbruster

"Chubb, Peter (Data61, Kensington NSW)" <[email protected]>

Quoted 7 lines · writes:
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Philippe" == Philippe Mathieu-Daudé <[email protected]> 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.

Quoted 8 lines
Quoted 6 lines
Quoted 5 lines

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 ([email protected]) 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/[email protected]/msg666280.html

Can you queue it instead?

#9 lore raw
Quoted 29 lines · Philippe Mathieu-Daudé

Hi Paolo,

Quoted 15 lines · Paolo Bonzini
Quoted 14 lines · Markus Armbruster

"Chubb, Peter (Data61, Kensington NSW)" <[email protected]>

Quoted 8 lines · writes:
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Philippe" == Philippe Mathieu-Daudé <[email protected]> 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.

Quoted 8 lines
Quoted 6 lines
Quoted 5 lines

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 ([email protected]) with:

Quoted 8 lines

- 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/[email protected]/msg666280.html

Can you queue it instead?

Yes, I replaced it.

Paolo