On 5/12/26 06:47, Peter Maydell wrote:
In timer_write(), we switch() on the address offset to handle
registers that need special-casing, with a default case that handles
both "unsupported (64-bit mode) register" and "can just write value
to st->regs[]". However, as Coverity points out, every register is
covered by the special-casing, so the "write to st->regs[]" code path
is dead. (timer_read() has a similar structure but there several
registers do go through the default code path.)
Replace the dead code with an assertion.
CID: 1613905
Signed-off-by: Peter Maydell<[email protected]>
---
hw/timer/mss-timer.c | 13 +++++--------
1 file changed, 5 insertions(+), 8 deletions(-)
Reviewed-by: Richard Henderson <[email protected]>
r~