target/mips32: fix false positive from clang
commitc47d77780cdaeac241e3be5d4433c7e4c8b475b9
authorAntonio Borneo <borneo.antonio@gmail.com>
Sat, 6 Jan 2024 16:54:24 +0000 (6 17:54 +0100)
committerAntonio Borneo <borneo.antonio@gmail.com>
Sat, 13 Jan 2024 14:45:56 +0000 (13 14:45 +0000)
tree0fe967cfdfb80c1cacab8744dc1516bf5e65970b
parent53811fc584dc8837546be9ac17b77fdf8ad1e8bd
target/mips32: fix false positive from clang

clang build triggers an error for an uninitialized value of the
variable 'instr'.
This is a false positive, as the macro
 #define MIPS32_CONFIG3_ISA_MASK (3 << MIPS32_CONFIG3_ISA_SHIFT)
guarantees the switch/case already covers all the possible values
with cases 0, 1, 2 and 3.

Silent clang by adding a useless default case to the switch.
While there, fix the indentation of the switch/case accordingly to
OpenOCD coding style.

Change-Id: I0ae316754ce7d091dd8366bf314b8e6ee780e313
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Fixes: 7de4b1202d50 ("target/mips32: add cpu info detection")
Reviewed-on: https://review.openocd.org/c/openocd/+/8065
Tested-by: jenkins
Reviewed-by: Oleksij Rempel <linux@rempel-privat.de>
src/target/mips32.c