From patchwork Mon Jan 31 09:54:46 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Alon Levy X-Patchwork-Id: 81088 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id BEED7B7113 for ; Mon, 31 Jan 2011 20:58:04 +1100 (EST) Received: from localhost ([127.0.0.1]:52230 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PjqVn-0000o1-5K for incoming@patchwork.ozlabs.org; Mon, 31 Jan 2011 04:57:31 -0500 Received: from [140.186.70.92] (port=38753 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PjqTT-00007O-Qc for qemu-devel@nongnu.org; Mon, 31 Jan 2011 04:55:11 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PjqTR-0008Fl-1G for qemu-devel@nongnu.org; Mon, 31 Jan 2011 04:55:07 -0500 Received: from mx1.redhat.com ([209.132.183.28]:10119) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PjqTQ-0008FM-JA for qemu-devel@nongnu.org; Mon, 31 Jan 2011 04:55:04 -0500 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id p0V9spSx004624 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 31 Jan 2011 04:54:52 -0500 Received: from playa.tlv.redhat.com (dhcp-3-110.tlv.redhat.com [10.35.3.110]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p0V9slBu015817 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Mon, 31 Jan 2011 04:54:50 -0500 Date: Mon, 31 Jan 2011 11:54:46 +0200 From: Alon Levy To: Aurelien Jarno Subject: Re: [Qemu-devel] [PATCH 1/8] target-arm: Fixes for several shift instructions: VRSHL, VRSHR, VRSHRN, VSHLL, VRSRA. Message-ID: <20110131095445.GB3657@playa.tlv.redhat.com> Mail-Followup-To: Aurelien Jarno , Christophe Lyon , "qemu-devel@nongnu.org" References: <1296229866-32011-1-git-send-email-christophe.lyon@st.com> <1296229866-32011-2-git-send-email-christophe.lyon@st.com> <20110131082050.GA4304@volta.aurel32.net> <4D468262.8020703@st.com> <20110131094414.GA7112@hall.aurel32.net> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20110131094414.GA7112@hall.aurel32.net> User-Agent: Mutt/1.5.21 (2010-09-15) X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 X-MIME-Autoconverted: from 8bit to quoted-printable by mx1.redhat.com id p0V9spSx004624 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.132.183.28 Cc: Christophe Lyon , "qemu-devel@nongnu.org" X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org On Mon, Jan 31, 2011 at 10:44:14AM +0100, Aurelien Jarno wrote: > On Mon, Jan 31, 2011 at 10:35:30AM +0100, Christophe Lyon wrote: > > On 31.01.2011 09:20, Aurelien Jarno wrote: > > > On Fri, Jan 28, 2011 at 04:50:59PM +0100, christophe.lyon@st.com wrote: > > >> From: Christophe Lyon > > >> > > >> Handle corner cases where the addition of the rounding constant could > > >> cause overflows. > > > > > > After applying this patch, I get the following gcc warning: > > > CC translate.o > > > cc1: warnings being treated as errors > > > qemu/target-arm/translate.c: In function ‘disas_neon_data_insn’: > > > qemu/target-arm/translate.c:4212: error: ‘imm’ may be used uninitialized in this function > > > make: *** [translate.o] Error 1 > > > > > > > Which GCC version are you using? I don't have such a warning (using GCC-4.5.1 on x86_64). > > > > I get this error with GCC 4.3.5, GCC 4.4.5, GCC 4.5.2 and GCC 4.6.0 > (r169270). This is also on x86_64. > gcc 4.6.0 turned on warnings also on set but not used variables, there are a few places that need fixes (pretty simple). This is the patch I have applied: commit 53bf1becf85a14c399698ae0961eb2b08d231986 Author: Alon Levy Date: Fri Jan 28 11:04:43 2011 +0200 (temp) gcc 4.6.0 corrections for build > -- > Aurelien Jarno GPG: 1024D/F1BCDB73 > aurelien@aurel32.net http://www.aurel32.net > diff --git a/block/qcow2-refcount.c b/block/qcow2-refcount.c index e37e226..da1a2e9 100644 --- a/block/qcow2-refcount.c +++ b/block/qcow2-refcount.c @@ -708,6 +708,9 @@ int qcow2_update_snapshot_refcount(BlockDriverState *bs, int l2_size, i, j, l1_modified, l2_modified, nb_csectors, refcount; int ret; + (void)l2_modified; + (void)l2_size; + l2_table = NULL; l1_table = NULL; l1_size2 = l1_size * sizeof(uint64_t); diff --git a/target-i386/kvm.c b/target-i386/kvm.c index 7dfc357..a7019ee 100644 --- a/target-i386/kvm.c +++ b/target-i386/kvm.c @@ -892,7 +892,7 @@ static int kvm_get_xsave(CPUState *env) #ifdef KVM_CAP_XSAVE struct kvm_xsave* xsave; int ret, i; - uint16_t cwd, swd, twd, fop; + uint16_t cwd, swd, twd; if (!kvm_has_xsave()) return kvm_get_fpu(env); @@ -907,7 +907,6 @@ static int kvm_get_xsave(CPUState *env) cwd = (uint16_t)xsave->region[0]; swd = (uint16_t)(xsave->region[0] >> 16); twd = (uint16_t)xsave->region[1]; - fop = (uint16_t)(xsave->region[1] >> 16); env->fpstt = (swd >> 11) & 7; env->fpus = swd; env->fpuc = cwd; diff --git a/tcg/tcg.c b/tcg/tcg.c index 5dd6a2c..b4d230b 100644 --- a/tcg/tcg.c +++ b/tcg/tcg.c @@ -582,6 +582,7 @@ void tcg_gen_callN(TCGContext *s, TCGv_ptr func, unsigned int flags, nparam = gen_opparam_ptr++; #ifdef TCG_TARGET_I386 call_type = (flags & TCG_CALL_TYPE_MASK); + (void)call_type; #endif if (ret != TCG_CALL_DUMMY_ARG) { #if TCG_TARGET_REG_BITS < 64 diff --git a/ui/sdl.c b/ui/sdl.c index f599d42..a1458ce 100644 --- a/ui/sdl.c +++ b/ui/sdl.c @@ -87,12 +87,6 @@ static void sdl_update(DisplayState *ds, int x, int y, int w, int h) static void sdl_setdata(DisplayState *ds) { - SDL_Rect rec; - rec.x = 0; - rec.y = 0; - rec.w = real_screen->w; - rec.h = real_screen->h; - if (guest_screen != NULL) SDL_FreeSurface(guest_screen); guest_screen = SDL_CreateRGBSurfaceFrom(ds_get_data(ds), ds_get_width(ds), ds_get_height(ds),