• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Commit MetaInfo

Revisión124e4cfaa42bb5a14eec33ea47d3502b5f46eb33 (tree)
Tiempo2019-07-23 18:31:07
AutorPhilippe Mathieu-Daudé <philmd@redh...>
CommiterPhilippe Mathieu-Daudé

Log Message

hw/block/pflash_cfi02: Rewrite a fall through comment

GCC9 is confused by this comment when building with CFLAG
-Wimplicit-fallthrough=2:

hw/block/pflash_cfi02.c: In function ‘pflash_write’:
hw/block/pflash_cfi02.c:574:16: error: this statement may fall through [-Werror=implicit-fallthrough=]
574 | if (boff == 0x55 && cmd == 0x98) {
|
hw/block/pflash_cfi02.c:581:9: note: here
581 | default:
|
cc1: all warnings being treated as errors

Rewrite the comment using 'fall through' which is recognized by
GCC and static analyzers.

Reported-by: Stefan Weil <sw@weilnetz.de>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Message-Id: <20190719131425.10835-4-philmd@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>

Cambiar Resumen

Diferencia incremental

--- a/hw/block/pflash_cfi02.c
+++ b/hw/block/pflash_cfi02.c
@@ -577,7 +577,7 @@ static void pflash_write(void *opaque, hwaddr offset, uint64_t value,
577577 pfl->cmd = 0x98;
578578 return;
579579 }
580- /* No break here */
580+ /* fall through */
581581 default:
582582 DPRINTF("%s: invalid write for command %02x\n",
583583 __func__, pfl->cmd);