Patchwork [1/2] tcg: Fix unused-but-set-variable warning

login
register
mail settings
Submitter Christophe Fergeau
Date May 30, 2011, 10:28 a.m.
Message ID <1306751283-31537-2-git-send-email-cfergeau@redhat.com>
Download mbox | patch
Permalink /patch/97901/
State New
Headers show

Comments

Christophe Fergeau - May 30, 2011, 10:28 a.m.
Based on a patch from Hans de Goede <hdegoede@redhat.com>

This warning is new in gcc 4.6.

Acked-by: Amit Shah <amit.shah@redhat.com>
---
 tcg/tcg.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

Patch

diff --git a/tcg/tcg.c b/tcg/tcg.c
index 8748c05..e53b54c 100644
--- a/tcg/tcg.c
+++ b/tcg/tcg.c
@@ -585,7 +585,7 @@  void tcg_register_helper(void *func, const char *name)
 void tcg_gen_callN(TCGContext *s, TCGv_ptr func, unsigned int flags,
                    int sizemask, TCGArg ret, int nargs, TCGArg *args)
 {
-#ifdef TCG_TARGET_I386
+#if defined(TCG_TARGET_I386) && TCG_TARGET_REG_BITS < 64
     int call_type;
 #endif
     int i;
@@ -612,7 +612,7 @@  void tcg_gen_callN(TCGContext *s, TCGv_ptr func, unsigned int flags,
 
     *gen_opc_ptr++ = INDEX_op_call;
     nparam = gen_opparam_ptr++;
-#ifdef TCG_TARGET_I386
+#if defined(TCG_TARGET_I386) && TCG_TARGET_REG_BITS < 64
     call_type = (flags & TCG_CALL_TYPE_MASK);
 #endif
     if (ret != TCG_CALL_DUMMY_ARG) {