From patchwork Fri Jul 15 19:31:23 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: sergey.fedorov@linaro.org X-Patchwork-Id: 9232489 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 328FE608A6 for ; Fri, 15 Jul 2016 19:32:02 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 247BD27F86 for ; Fri, 15 Jul 2016 19:32:02 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 18DCE27F94; Fri, 15 Jul 2016 19:32:02 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id F230827F86 for ; Fri, 15 Jul 2016 19:32:00 +0000 (UTC) Received: from localhost ([::1]:34666 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bO8q6-0006md-Ss for patchwork-qemu-devel@patchwork.kernel.org; Fri, 15 Jul 2016 15:31:58 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42892) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bO8pr-0006jy-GB for qemu-devel@nongnu.org; Fri, 15 Jul 2016 15:31:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bO8pn-00039M-AY for qemu-devel@nongnu.org; Fri, 15 Jul 2016 15:31:42 -0400 Received: from mail-lf0-x229.google.com ([2a00:1450:4010:c07::229]:35251) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bO8pm-000399-PW for qemu-devel@nongnu.org; Fri, 15 Jul 2016 15:31:39 -0400 Received: by mail-lf0-x229.google.com with SMTP id f93so94930292lfi.2 for ; Fri, 15 Jul 2016 12:31:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=mFHePh33JtGLl6U5HWoEqHYK4xu7CVrizgR/95Q3puI=; b=Gacdm4M1UmJ2lglIY8Ar/mHx72fLv/qES+9iTCkhQWj0qSzFJWxWRLwgY2aH0Y1PQC pgzoPeWrbgZUARPoqsaATBEoEI3b5KDsrSJ0/aQLis5ARLVgTmxDvpz8Kkv2GUNv28HA otlGHZy/VTQVs9qjM1YJNv1HTEnn29klYpqMA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=mFHePh33JtGLl6U5HWoEqHYK4xu7CVrizgR/95Q3puI=; b=duV8P4EqU9XwC8aY7HtE2X950DzOS751anbPbSUaQOH6ey+nmsBFt0x56PQw+ZxrnU QzNVEGcxbPzMdTqvis5tNA7RKHUmHr+2c6Kn5baxXXntxeHqbuSEmylLVWz3kdnzMZ++ Et8In2c2WKgueYPtfwoEvgfFTgeNTEEoZM8vnWtDxjzOzpxuASgDvNk+rqkh06gbooEB z/AYZbZ9LdMiWh5AlaDK78e+T1/Vhagi3ddsKDsXPFhqGtzi0NlREG1OS9pZumBz/wIS LwAc1gxO2mMcY1ZoHP5+QUQM2bh/V0OUPg88jvwGSwUMDcpXH1BcYt/OY+mNx4uTKhj4 /KCg== X-Gm-Message-State: ALyK8tK/XAXSpf+xeVfdFuSQtwSsssb4sWkcHzF94RzGwzFGVLAeQPeNN0IV/+mMS5yXRAjF X-Received: by 10.25.144.8 with SMTP id s8mr11380578lfd.94.1468611097675; Fri, 15 Jul 2016 12:31:37 -0700 (PDT) Received: from sergey-laptop.Dlink (broadband-46-188-120-37.2com.net. [46.188.120.37]) by smtp.gmail.com with ESMTPSA id f22sm1263980lji.13.2016.07.15.12.31.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 15 Jul 2016 12:31:36 -0700 (PDT) From: Sergey Fedorov To: qemu-devel@nongnu.org Date: Fri, 15 Jul 2016 22:31:23 +0300 Message-Id: <20160715193123.28113-1-sergey.fedorov@linaro.org> X-Mailer: git-send-email 2.9.1 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a00:1450:4010:c07::229 Subject: [Qemu-devel] [PATCH] cpu-exec: Move down some declarations in cpu_exec() X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Sergey Fedorov , Peter Crosthwaite , Stefan Weil , Sergey Fedorov , Paolo Bonzini , Richard Henderson Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Sergey Fedorov This will fix a compiler warning with -Wclobbered: http://lists.nongnu.org/archive/html/qemu-devel/2016-07/msg03347.html Reported-by: Stefan Weil Signed-off-by: Sergey Fedorov Signed-off-by: Sergey Fedorov Reviewed-by: Stefan Weil --- cpu-exec.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/cpu-exec.c b/cpu-exec.c index b840e1d2dd41..5d9710a1eaf2 100644 --- a/cpu-exec.c +++ b/cpu-exec.c @@ -608,17 +608,16 @@ int cpu_exec(CPUState *cpu) init_delay_params(&sc, cpu); for(;;) { - TranslationBlock *tb, *last_tb; - int tb_exit = 0; - /* prepare setjmp context for exception handling */ if (sigsetjmp(cpu->jmp_env, 0) == 0) { + TranslationBlock *tb, *last_tb = NULL; + int tb_exit = 0; + /* if an exception is pending, we execute it here */ if (cpu_handle_exception(cpu, &ret)) { break; } - last_tb = NULL; /* forget the last executed TB after exception */ cpu->tb_flushed = false; /* reset before first TB lookup */ for(;;) { cpu_handle_interrupt(cpu, &last_tb);