]> git.proxmox.com Git - mirror_qemu.git/commitdiff
hw/timer/renesas_tmr: silence the compiler warnings
authorChen Qun <kuhn.chenqun@huawei.com>
Fri, 11 Dec 2020 15:24:18 +0000 (16:24 +0100)
committerThomas Huth <thuth@redhat.com>
Fri, 18 Dec 2020 08:14:23 +0000 (09:14 +0100)
When using -Wimplicit-fallthrough in our CFLAGS, the compiler showed warning:
../hw/timer/renesas_tmr.c: In function ‘tmr_read’:
../hw/timer/renesas_tmr.c:221:19: warning: this statement may fall through [-Wimplicit-fallthrough=]
  221 |         } else if (ch == 0) {i
      |                   ^
../hw/timer/renesas_tmr.c:224:5: note: here
  224 |     case A_TCORB:
      |     ^~~~

Add the corresponding "fall through" comment to fix it.

Reported-by: Euler Robot <euler.robot@huawei.com>
Signed-off-by: Chen Qun <kuhn.chenqun@huawei.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20201211152426.350966-5-thuth@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
hw/timer/renesas_tmr.c

index 446f2eacdd76d7bbc1bac0b41295da06eed08f64..e03a8155b2b3a626d0e6364b2e760f70b3d32b87 100644 (file)
@@ -221,6 +221,7 @@ static uint64_t tmr_read(void *opaque, hwaddr addr, unsigned size)
         } else if (ch == 0) {
             return concat_reg(tmr->tcora);
         }
+        /* fall through */
     case A_TCORB:
         if (size == 1) {
             return tmr->tcorb[ch];