Received: from eggs.gnu.org ([2001:4830:134:3::10]:57767) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1an2KI-0007dx-As for qemu-devel@nongnu.org; Mon, 04 Apr 2016 07:05:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1an2KD-000140-Az for qemu-devel@nongnu.org; Mon, 04 Apr 2016 07:05:46 -0400 Received: from mail-lf0-x22a.google.com ([2a00:1450:4010:c07::22a]:35204) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1an2KC-00013t-Kl for qemu-devel@nongnu.org; Mon, 04 Apr 2016 07:05:41 -0400 Received: by mail-lf0-x22a.google.com with SMTP id c126so45675711lfb.2 for ; Mon, 04 Apr 2016 04:05:40 -0700 (PDT) From: Sergey Fedorov Date: Mon, 4 Apr 2016 14:05:18 +0300 Message-Id: <1459767918-796-1-git-send-email-sergey.fedorov@linaro.org> Subject: [Qemu-devel] [PATCH] tci: Fix build with no '-DNDEBUG' List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: qemu-trivial@nongnu.org, Sergey Fedorov , Sergey Fedorov , Stefan Weil From: Sergey Fedorov 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 Signed-off-by: Sergey Fedorov --- 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