From 8e6499fb0bbf8780299698c1ac1c14df0062fc47 Mon Sep 17 00:00:00 2001 From: BitMaskMixer <10599299+BitMaskMixer@users.noreply.github.com> Date: Fri, 19 Jul 2024 05:09:57 +0200 Subject: [PATCH] gcc compiler warning fixes (#1977) * fix for enum-int-mismatch * fix for unused-variable --- qemu/include/tcg/tcg-apple-jit.h | 4 ++-- qemu/target/ppc/excp_helper.c | 2 +- uc.c | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/qemu/include/tcg/tcg-apple-jit.h b/qemu/include/tcg/tcg-apple-jit.h index 9c4d3843..9c86b3a2 100644 --- a/qemu/include/tcg/tcg-apple-jit.h +++ b/qemu/include/tcg/tcg-apple-jit.h @@ -94,14 +94,14 @@ static inline void jit_write_protect(int enabled) #define JIT_CALLBACK_GUARD(x) \ { \ - (void*)uc; \ + (void)uc; \ x; \ } \ #define JIT_CALLBACK_GUARD_VAR(var, x) \ { \ - (void*)uc; \ + (void)uc; \ var = x; \ } \ diff --git a/qemu/target/ppc/excp_helper.c b/qemu/target/ppc/excp_helper.c index f1114b5b..298b7730 100644 --- a/qemu/target/ppc/excp_helper.c +++ b/qemu/target/ppc/excp_helper.c @@ -1064,7 +1064,7 @@ void helper_store_msr(CPUPPCState *env, target_ulong val) #if defined(_MSC_VER) && defined(__clang__) void helper_pminsn(CPUPPCState *env, uint32_t insn) #else -void helper_pminsn(CPUPPCState *env, powerpc_pm_insn_t insn) +void helper_pminsn(CPUPPCState *env, uint32_t /*powerpc_pm_insn_t*/ insn) #endif { CPUState *cs; diff --git a/uc.c b/uc.c index 24c6ade2..7dd49883 100644 --- a/uc.c +++ b/uc.c @@ -65,11 +65,11 @@ static void restore_jit_state(uc_engine *uc) #else static void save_jit_state(uc_engine *uc) { - (void *)uc; + (void)uc; } static void restore_jit_state(uc_engine *uc) { - (void *)uc; + (void)uc; } #endif