aboutsummaryrefslogtreecommitdiff
path: root/accel/tcg
diff options
context:
space:
mode:
authorRichard Henderson <richard.henderson@linaro.org>2021-07-12 18:29:34 +0000
committerRichard Henderson <richard.henderson@linaro.org>2021-07-26 07:06:49 -1000
commit2521c775bdfc8150396c4cb173b54d51f44c207e (patch)
treec1562e51a2f6fc833bea747f815380b6b07f6b57 /accel/tcg
parentcd1675f8d7fa33b5071a4d3be5dcb69c38300f17 (diff)
downloadqemu-2521c775bdfc8150396c4cb173b54d51f44c207e.zip
qemu-2521c775bdfc8150396c4cb173b54d51f44c207e.tar.gz
qemu-2521c775bdfc8150396c4cb173b54d51f44c207e.tar.bz2
accel/tcg: Remove unused variable in cpu_exec
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>
Diffstat (limited to 'accel/tcg')
-rw-r--r--accel/tcg/cpu-exec.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/accel/tcg/cpu-exec.c b/accel/tcg/cpu-exec.c
index 5aa42fb..e5c0ccd 100644
--- a/accel/tcg/cpu-exec.c
+++ b/accel/tcg/cpu-exec.c
@@ -855,7 +855,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 };
@@ -889,19 +888,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