linux-user/hppa: fix -Werror=maybe-uninitialized false-positive

../linux-user/hppa/cpu_loop.c: In function ‘hppa_lws’:
../linux-user/hppa/cpu_loop.c:106:17: error: ‘ret’ may be used uninitialized [-Werror=maybe-uninitialized]
  106 |     env->gr[28] = ret;

Add g_assert_not_reached() to help compiler, as suggested by Laurent.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
This commit is contained in:
Marc-André Lureau 2024-09-24 15:43:56 +04:00
parent 85f99eb2cb
commit 0d0f95c7bc

View File

@ -99,6 +99,8 @@ static abi_ulong hppa_lws(CPUHPPAState *env)
#endif
}
break;
default:
g_assert_not_reached();
}
break;
}