From: Antonio Borneo Date: Wed, 25 Jul 2018 20:51:51 +0000 (+0200) Subject: target/riscv: fix compile error with gcc 8.1.1 X-Git-Tag: v0.11.0-rc1~1031 X-Git-Url: https://review.openocd.org/gitweb?p=openocd.git;a=commitdiff_plain;h=d537cce7ef49bf2f4bc81cf016f784a9adf2537a target/riscv: fix compile error with gcc 8.1.1 Fix compile error: src/target/riscv/riscv-011.c: In function ‘slot_offset’: src/target/riscv/riscv-011.c:238:4: error: this statement may fall through [-Werror=implicit-fallthrough=] switch (slot) { ^~~~~~ src/target/riscv/riscv-011.c:243:3: note: here case 64: ^~~~ Fixes: a51ab8ddf63a ("Add RISC-V support.") Change-Id: I7fa86b305bd90cc590fd4359c3698632d44712e5 Signed-off-by: Antonio Borneo Reviewed-on: http://openocd.zylin.com/4618 Tested-by: jenkins Reviewed-by: Jiri Kastner Reviewed-by: Oleksij Rempel Reviewed-by: Tim Newsome Reviewed-by: Paul Fertser --- diff --git a/src/target/riscv/riscv-011.c b/src/target/riscv/riscv-011.c index f2a68698b1..498da5ad5a 100644 --- a/src/target/riscv/riscv-011.c +++ b/src/target/riscv/riscv-011.c @@ -240,6 +240,7 @@ static unsigned int slot_offset(const struct target *target, slot_t slot) case SLOT1: return 5; case SLOT_LAST: return info->dramsize-1; } + break; case 64: switch (slot) { case SLOT0: return 4;