]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
ppc: Add a missing break for PPC6xx_INPUT_TBEN
authorChen Qun <kuhn.chenqun@huawei.com>
Mon, 16 Nov 2020 02:48:09 +0000 (10:48 +0800)
committerDavid Gibson <david@gibson.dropbear.id.au>
Mon, 14 Dec 2020 04:50:55 +0000 (15:50 +1100)
When using -Wimplicit-fallthrough in our CFLAGS, the compiler showed warning:
hw/ppc/ppc.c: In function ‘ppc6xx_set_irq’:
hw/ppc/ppc.c:118:16: warning: this statement may fall through [-Wimplicit-fallthrough=]
  118 |             if (level) {
      |                ^
hw/ppc/ppc.c:123:9: note: here
  123 |         case PPC6xx_INPUT_INT:
      |         ^~~~

According to the discussion, a break statement needs to be added here.

Reported-by: Euler Robot <euler.robot@huawei.com>
Signed-off-by: Chen Qun <kuhn.chenqun@huawei.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Acked-by: David Gibson <david@gibson.dropbear.id.au>
Message-Id: <20201116024810.2415819-7-kuhn.chenqun@huawei.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
hw/ppc/ppc.c

index 4a11fb1640f540c6e812d10cc6a03d754dbb77f5..1b9827207676941f5f36ba6ac4d247e416136f45 100644 (file)
@@ -120,6 +120,7 @@ static void ppc6xx_set_irq(void *opaque, int pin, int level)
             } else {
                 cpu_ppc_tb_stop(env);
             }
+            break;
         case PPC6xx_INPUT_INT:
             /* Level sensitive - active high */
             LOG_IRQ("%s: set the external IRQ state to %d\n",