mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2025-02-02 13:41:10 +00:00
target/m68k: Fix build Werror with gcc 8.0.1
The Werror stems from the compiler finding a path through the second switch via a missing default case in which src1 is uninitialized, and not being able to prove that the missing default case is unreachable due to the first switch. Simplify the second switch to merge default with OS_LONG, which returns directly. This removes the unreachable path. Backports commit 5cbc61110738accb16ff8ed1f08a32906d02790f from qemu.
This commit is contained in:
parent
ca9b601d0d
commit
991683af73
|
@ -2369,7 +2369,7 @@ DISAS_INSN(arith_im)
|
|||
im = tcg_const_i32(tcg_ctx, read_im32(env, s));
|
||||
break;
|
||||
default:
|
||||
abort();
|
||||
g_assert_not_reached();
|
||||
}
|
||||
|
||||
if (with_SR) {
|
||||
|
@ -2389,7 +2389,8 @@ DISAS_INSN(arith_im)
|
|||
}
|
||||
src1 = gen_get_sr(s);
|
||||
break;
|
||||
case OS_LONG:
|
||||
default:
|
||||
/* OS_LONG; others already g_assert_not_reached. */
|
||||
disas_undef(env, s, insn);
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue