diff mbox series

[v2,3/4] target/s390x: fix build warning (gcc-12 -fsanitize=thread)

Message ID 20240814224132.897098-4-pierrick.bouvier@linaro.org (mailing list archive)
State New, archived
Headers show
Series build qemu with gcc and tsan | expand

Commit Message

Pierrick Bouvier Aug. 14, 2024, 10:41 p.m. UTC
Found on debian stable.

../target/s390x/tcg/translate.c: In function ‘get_mem_index’:
../target/s390x/tcg/translate.c:398:1: error: control reaches end of non-void function [-Werror=return-type]
  398 | }

Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
---
 target/s390x/tcg/translate.c | 1 -
 1 file changed, 1 deletion(-)

Comments

Ilya Leoshkevich Aug. 14, 2024, 10:57 p.m. UTC | #1
On Wed, 2024-08-14 at 15:41 -0700, Pierrick Bouvier wrote:
> Found on debian stable.
> 
> ../target/s390x/tcg/translate.c: In function ‘get_mem_index’:
> ../target/s390x/tcg/translate.c:398:1: error: control reaches end of
> non-void function [-Werror=return-type]
>   398 | }
> 
> Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>

Acked-by: Ilya Leoshkevich <iii@linux.ibm.com>
diff mbox series

Patch

diff --git a/target/s390x/tcg/translate.c b/target/s390x/tcg/translate.c
index c81e035dea4..bcfff40b255 100644
--- a/target/s390x/tcg/translate.c
+++ b/target/s390x/tcg/translate.c
@@ -392,7 +392,6 @@  static int get_mem_index(DisasContext *s)
         return MMU_HOME_IDX;
     default:
         g_assert_not_reached();
-        break;
     }
 #endif
 }