[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH for-6.1? v2 2/9] accel/tcg: Remove unused variable in cpu_exec
From: |
Richard Henderson |
Subject: |
[PATCH for-6.1? v2 2/9] accel/tcg: Remove unused variable in cpu_exec |
Date: |
Sun, 25 Jul 2021 02:24:09 -1000 |
>From clang-13:
accel/tcg/cpu-exec.c:783:15: error: variable 'cc' set but not used \
[-Werror,-Wunused-but-set-variable]
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
accel/tcg/cpu-exec.c | 10 ++--------
1 file changed, 2 insertions(+), 8 deletions(-)
diff --git a/accel/tcg/cpu-exec.c b/accel/tcg/cpu-exec.c
index fc895cf51e..1c6f684cb0 100644
--- a/accel/tcg/cpu-exec.c
+++ b/accel/tcg/cpu-exec.c
@@ -853,7 +853,6 @@ static inline void cpu_loop_exec_tb(CPUState *cpu,
TranslationBlock *tb,
int cpu_exec(CPUState *cpu)
{
- CPUClass *cc = CPU_GET_CLASS(cpu);
int ret;
SyncClocks sc = { 0 };
@@ -887,19 +886,14 @@ int cpu_exec(CPUState *cpu)
* that we support, but is still unfixed in clang:
* https://bugs.llvm.org/show_bug.cgi?id=21183
*
- * Reload essential local variables here for those compilers.
+ * Reload an essential local variable here for those compilers.
* Newer versions of gcc would complain about this code (-Wclobbered),
* so we only perform the workaround for clang.
*/
cpu = current_cpu;
- cc = CPU_GET_CLASS(cpu);
#else
- /*
- * Non-buggy compilers preserve these locals; assert that
- * they have the correct value.
- */
+ /* Non-buggy compilers preserve this; assert the correct value. */
g_assert(cpu == current_cpu);
- g_assert(cc == CPU_GET_CLASS(cpu));
#endif
#ifndef CONFIG_SOFTMMU
--
2.25.1
- [PATCH for-6.1? v2 0/9] Fixes for clang-13, Richard Henderson, 2021/07/25
- [PATCH for-6.1? v2 1/9] nbd/server: Mark variable unused in nbd_negotiate_meta_queries, Richard Henderson, 2021/07/25
- [PATCH for-6.1? v2 2/9] accel/tcg: Remove unused variable in cpu_exec,
Richard Henderson <=
- [PATCH for-6.1? v2 4/9] net/checksum: Remove unused variable in net_checksum_add_iov, Richard Henderson, 2021/07/25
- [PATCH for-6.1? v2 3/9] util/selfmap: Discard mapping on error, Richard Henderson, 2021/07/25
- [PATCH for-6.1? v2 5/9] hw/audio/adlib: Remove unused variable in adlib_callback, Richard Henderson, 2021/07/25
- [PATCH for-6.1? v2 6/9] hw/ppc/spapr_events: Remove unused variable from check_exception, Richard Henderson, 2021/07/25
- [PATCH for-6.1? v2 7/9] hw/pci-hist/pnv_phb4: Fix typo in pnv_phb4_ioda_write, Richard Henderson, 2021/07/25