qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] tci: Fix build with no '-DNDEBUG'
@ 2016-04-04 11:05 Sergey Fedorov
  2016-04-04 11:56 ` Stefan Weil
  0 siblings, 1 reply; 5+ messages in thread
From: Sergey Fedorov @ 2016-04-04 11:05 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-trivial, Sergey Fedorov, Sergey Fedorov, Stefan Weil

From: Sergey Fedorov <serge.fdrv@gmail.com>

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 <serge.fdrv@gmail.com>
Signed-off-by: Sergey Fedorov <sergey.fedorov@linaro.org>
---
 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 *tb_ptr)
 
     for (;;) {
         TCGOpcode opc = tb_ptr[0];
-#if !defined(NDEBUG)
         uint8_t op_size = tb_ptr[1];
         uint8_t *old_code_ptr = tb_ptr;
-#endif
         tcg_target_ulong t0;
         tcg_target_ulong t1;
         tcg_target_ulong t2;
-- 
2.7.3

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-04-04 18:06 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-04 11:05 [Qemu-devel] [PATCH] tci: Fix build with no '-DNDEBUG' Sergey Fedorov
2016-04-04 11:56 ` Stefan Weil
2016-04-04 13:22   ` Sergey Fedorov
2016-04-04 17:53     ` Stefan Weil
2016-04-04 18:06       ` Sergey Fedorov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).