From patchwork Wed Nov 9 18:03:35 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 124647 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [140.186.70.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 4E381B6F69 for ; Thu, 10 Nov 2011 05:04:51 +1100 (EST) Received: from localhost ([::1]:47375 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ROCVw-0000bp-HR for incoming@patchwork.ozlabs.org; Wed, 09 Nov 2011 13:04:44 -0500 Received: from eggs.gnu.org ([140.186.70.92]:35685) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ROCVe-0008Kr-FD for qemu-devel@nongnu.org; Wed, 09 Nov 2011 13:04:27 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ROCVd-0005fI-Do for qemu-devel@nongnu.org; Wed, 09 Nov 2011 13:04:26 -0500 Received: from mail-qw0-f45.google.com ([209.85.216.45]:45307) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ROCVd-0005eM-BW for qemu-devel@nongnu.org; Wed, 09 Nov 2011 13:04:25 -0500 Received: by mail-qw0-f45.google.com with SMTP id z3so2364892qad.4 for ; Wed, 09 Nov 2011 10:04:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=sender:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references; bh=Vi5ksklLNL3yKDkmIxiadPp+JOLLG+iJ6h8PJq5moG0=; b=cKWcznhDzMjTWSLzC+rHsluMnc89mSUAzEGyvcdMJFJC8QIS2Rsjrtqpd+WoRzfGRW SOh4+NQIP/mIlS77FNL7e4u0ezNkf2ApUNKQTz2wrb1iNry/hZbmXJmowMfPIT5gwgyp 6TSQfm1MG0UmHh5GUs3fvDmnm+ZrqpMt3NLiQ= Received: by 10.224.200.197 with SMTP id ex5mr3118664qab.88.1320861865212; Wed, 09 Nov 2011 10:04:25 -0800 (PST) Received: from localhost.localdomain (c-98-203-235-125.hsd1.wa.comcast.net. [98.203.235.125]) by mx.google.com with ESMTPS id z1sm5786992qao.1.2011.11.09.10.04.23 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 09 Nov 2011 10:04:24 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Date: Wed, 9 Nov 2011 10:03:35 -0800 Message-Id: <1320861815-14317-4-git-send-email-rth@twiddle.net> X-Mailer: git-send-email 1.7.6.4 In-Reply-To: <1320861815-14317-1-git-send-email-rth@twiddle.net> References: <1320861815-14317-1-git-send-email-rth@twiddle.net> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 209.85.216.45 Cc: Stefan Weil , Alexander Graf , Blue Swirl , Aurelien Jarno Subject: [Qemu-devel] [PATCH 3/3] tcg-sparc: Fix set-but-not used warnings. X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org In both cases, val is computed, but then not used in the subsequent line, which then re-computes the quantity in a different type (int32_t vs unsigned long). Keep the computation type that's been working so far. Signed-off-by: Richard Henderson --- tcg/sparc/tcg-target.c | 4 ---- 1 files changed, 0 insertions(+), 4 deletions(-) diff --git a/tcg/sparc/tcg-target.c b/tcg/sparc/tcg-target.c index b96312b..5cd5a3b 100644 --- a/tcg/sparc/tcg-target.c +++ b/tcg/sparc/tcg-target.c @@ -473,11 +473,9 @@ static inline void tcg_out_nop(TCGContext *s) static void tcg_out_branch_i32(TCGContext *s, int opc, int label_index) { - int32_t val; TCGLabel *l = &s->labels[label_index]; if (l->has_value) { - val = l->u.value - (tcg_target_long)s->code_ptr; tcg_out32(s, (INSN_OP(0) | INSN_COND(opc, 0) | INSN_OP2(0x2) | INSN_OFF22(l->u.value - (unsigned long)s->code_ptr))); } else { @@ -489,11 +487,9 @@ static void tcg_out_branch_i32(TCGContext *s, int opc, int label_index) #if TCG_TARGET_REG_BITS == 64 static void tcg_out_branch_i64(TCGContext *s, int opc, int label_index) { - int32_t val; TCGLabel *l = &s->labels[label_index]; if (l->has_value) { - val = l->u.value - (tcg_target_long)s->code_ptr; tcg_out32(s, (INSN_OP(0) | INSN_COND(opc, 0) | INSN_OP2(0x1) | (0x5 << 19) | INSN_OFF19(l->u.value - (unsigned long)s->code_ptr)));