From 0d0f95c7bcde008510e6c9013e00b25941c83871 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Date: Tue, 24 Sep 2024 15:43:56 +0400 Subject: linux-user/hppa: fix -Werror=maybe-uninitialized false-positive MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ../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 Reviewed-by: Laurent Vivier --- linux-user/hppa/cpu_loop.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'linux-user') diff --git a/linux-user/hppa/cpu_loop.c b/linux-user/hppa/cpu_loop.c index bc093b8fe8..23b38ff9b2 100644 --- a/linux-user/hppa/cpu_loop.c +++ b/linux-user/hppa/cpu_loop.c @@ -99,6 +99,8 @@ static abi_ulong hppa_lws(CPUHPPAState *env) #endif } break; + default: + g_assert_not_reached(); } break; } -- cgit v1.2.3