target/ppc: Fix warning with clang-15
When compiling for windows-arm64 using clang-15, it reports a sometimes uninitialized variable. This seems to be a false positive, as a default case guards switch expressions, preventing to return an uninitialized value, but clang seems unhappy with assert(0) definition. Change code to g_assert_not_reached() fix the warning. Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-Id: <20230221153006.20300-5-pierrick.bouvier@linaro.org> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
This commit is contained in:
parent
60f5fadd13
commit
a1a65aade6
@ -121,7 +121,7 @@ static void dfp_set_round_mode_from_immediate(uint8_t r, uint8_t rmc,
|
|||||||
case 3: /* use FPSCR rounding mode */
|
case 3: /* use FPSCR rounding mode */
|
||||||
return;
|
return;
|
||||||
default:
|
default:
|
||||||
assert(0); /* cannot get here */
|
g_assert_not_reached();
|
||||||
}
|
}
|
||||||
} else { /* r == 1 */
|
} else { /* r == 1 */
|
||||||
switch (rmc & 3) {
|
switch (rmc & 3) {
|
||||||
@ -138,7 +138,7 @@ static void dfp_set_round_mode_from_immediate(uint8_t r, uint8_t rmc,
|
|||||||
rnd = DEC_ROUND_HALF_DOWN;
|
rnd = DEC_ROUND_HALF_DOWN;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
assert(0); /* cannot get here */
|
g_assert_not_reached();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
decContextSetRounding(&dfp->context, rnd);
|
decContextSetRounding(&dfp->context, rnd);
|
||||||
|
Loading…
Reference in New Issue
Block a user