[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-trivial] [PATCH] tci: Fix build with no '-DNDEBUG'

From: Sergey Fedorov
Subject: [Qemu-trivial] [PATCH] tci: Fix build with no '-DNDEBUG'
Date: Mon, 4 Apr 2016 14:05:18 +0300

From: Sergey Fedorov <address@hidden>

assert() always evaluates its argument so there's no need to #ifdef the
definitions which is only used for assert(). Actually, doing so
generates a compilation warning which is treated as an error in QEMU
build by default. Let compiler sort out and eliminate unnecessary
local variables.

Signed-off-by: Sergey Fedorov <address@hidden>
Signed-off-by: Sergey Fedorov <address@hidden>
 tci.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/tci.c b/tci.c
index 7cbb39ed4b6a..d709e008f3f9 100644
--- a/tci.c
+++ b/tci.c
@@ -472,10 +472,8 @@ uintptr_t tcg_qemu_tb_exec(CPUArchState *env, uint8_t 
     for (;;) {
         TCGOpcode opc = tb_ptr[0];
-#if !defined(NDEBUG)
         uint8_t op_size = tb_ptr[1];
         uint8_t *old_code_ptr = tb_ptr;
         tcg_target_ulong t0;
         tcg_target_ulong t1;
         tcg_target_ulong t2;

reply via email to

[Prev in Thread] Current Thread [Next in Thread]