qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@redhat.com>
To: qemu-devel@nongnu.org
Cc: "Peter Maydell" <peter.maydell@linaro.org>,
	qemu-trivial@nongnu.org, "Andrew Jeffery" <andrew@aj.id.au>,
	qemu-arm@nongnu.org, "Joel Stanley" <joel@jms.id.au>,
	"Philippe Mathieu-Daudé" <philmd@redhat.com>,
	"Cédric Le Goater" <clg@kaod.org>
Subject: [PATCH 4/6] hw/timer/aspeed_timer: Add a fall through comment
Date: Tue, 17 Dec 2019 18:34:23 +0100	[thread overview]
Message-ID: <20191217173425.5082-5-philmd@redhat.com> (raw)
In-Reply-To: <20191217173425.5082-1-philmd@redhat.com>

Reported by GCC9 when building with CFLAG -Wimplicit-fallthrough=2:

  hw/timer/aspeed_timer.c: In function ‘aspeed_timer_set_value’:
  hw/timer/aspeed_timer.c:283:24: error: this statement may fall through [-Werror=implicit-fallthrough=]
    283 |         if (old_reload || !t->reload) {
        |             ~~~~~~~~~~~^~~~~~~~~~~~~
  hw/timer/aspeed_timer.c:287:5: note: here
    287 |     case TIMER_REG_STATUS:
        |     ^~~~
  cc1: all warnings being treated as errors

Add the missing fall through comment.

Fixes: 1403f364472
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
Cc: "Cédric Le Goater" <clg@kaod.org>
Cc: Peter Maydell <peter.maydell@linaro.org>
Cc: Andrew Jeffery <andrew@aj.id.au>
Cc: Joel Stanley <joel@jms.id.au>
Cc: qemu-arm@nongnu.org
---
 hw/timer/aspeed_timer.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/timer/aspeed_timer.c b/hw/timer/aspeed_timer.c
index a8c38cc118..c91f18415c 100644
--- a/hw/timer/aspeed_timer.c
+++ b/hw/timer/aspeed_timer.c
@@ -283,7 +283,7 @@ static void aspeed_timer_set_value(AspeedTimerCtrlState *s, int timer, int reg,
         if (old_reload || !t->reload) {
             break;
         }
-
+        /* fall through to re-enable */
     case TIMER_REG_STATUS:
         if (timer_enabled(t)) {
             uint64_t now = qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL);
-- 
2.21.0



  parent reply	other threads:[~2019-12-17 17:38 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-17 17:34 [PATCH 0/6] Fix more GCC9 -O3 warnings Philippe Mathieu-Daudé
2019-12-17 17:34 ` [PATCH 1/6] audio/audio: Add missing fall through comment Philippe Mathieu-Daudé
2019-12-18  3:45   ` Richard Henderson
2019-12-18  8:02   ` Aleksandar Markovic
2019-12-18 10:22     ` Philippe Mathieu-Daudé
2019-12-17 17:34 ` [PATCH 2/6] hw/display/tcx: Add missing fall through comments Philippe Mathieu-Daudé
2019-12-18  3:57   ` Richard Henderson
2019-12-18  7:54   ` Aleksandar Markovic
2019-12-18 10:23     ` Philippe Mathieu-Daudé
2019-12-17 17:34 ` [PATCH 3/6] hw/net/imx_fec: Rewrite " Philippe Mathieu-Daudé
2019-12-17 17:55   ` Thomas Huth
2019-12-18 19:35     ` Thomas Huth
2019-12-18  3:45   ` Richard Henderson
2019-12-18  8:00   ` Aleksandar Markovic
2019-12-17 17:34 ` Philippe Mathieu-Daudé [this message]
2019-12-17 17:54   ` [PATCH 4/6] hw/timer/aspeed_timer: Add a fall through comment Cédric Le Goater
2019-12-18  8:26   ` Aleksandar Markovic
2019-12-17 17:34 ` [PATCH 5/6] hw/scsi/megasas: Silent GCC9 duplicated-cond warning Philippe Mathieu-Daudé
2019-12-18  4:03   ` Richard Henderson
2019-12-18 17:52     ` Philippe Mathieu-Daudé
2019-12-18 19:02       ` Richard Henderson
2020-01-07 14:56     ` Paolo Bonzini
2020-01-07 16:20       ` Hannes Reinecke
2019-12-17 17:34 ` [PATCH 6/6] qemu-io-cmds: Silent GCC9 format-overflow warning Philippe Mathieu-Daudé
2019-12-18  4:15   ` Richard Henderson
2019-12-18 17:45     ` Philippe Mathieu-Daudé
2019-12-18 19:21       ` Richard Henderson

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=20191217173425.5082-5-philmd@redhat.com \
    --to=philmd@redhat.com \
    --cc=andrew@aj.id.au \
    --cc=clg@kaod.org \
    --cc=joel@jms.id.au \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-trivial@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).