From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NKW24-0000Ca-Oe for qemu-devel@nongnu.org; Tue, 15 Dec 2009 06:57:36 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NKW1y-0008WG-KV for qemu-devel@nongnu.org; Tue, 15 Dec 2009 06:57:34 -0500 Received: from [199.232.76.173] (port=42991 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NKW1y-0008W0-5z for qemu-devel@nongnu.org; Tue, 15 Dec 2009 06:57:30 -0500 Received: from mail-px0-f189.google.com ([209.85.216.189]:36897) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NKW1x-0008Bg-Sn for qemu-devel@nongnu.org; Tue, 15 Dec 2009 06:57:30 -0500 Received: by pxi27 with SMTP id 27so2799579pxi.4 for ; Tue, 15 Dec 2009 03:57:28 -0800 (PST) MIME-Version: 1.0 In-Reply-To: <1260784489-15773-1-git-send-email-weil@mail.berlios.de> References: <1260784489-15773-1-git-send-email-weil@mail.berlios.de> Date: Tue, 15 Dec 2009 12:57:27 +0100 Message-ID: <761ea48b0912150357g5b023aa8s56c06a40ef6c1873@mail.gmail.com> Subject: Re: [Qemu-devel] [PATCH] target-alpha: Fix compiler warning for gcc-4.3 (and older) From: Laurent Desnogues Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Weil Cc: QEMU Developers , Aurelien Jarno , Richard Henderson On Mon, Dec 14, 2009 at 10:54 AM, Stefan Weil wrote: > "Old" compilers obviously are not able to recognise > that all cases are handled here: > > qemu/target-alpha/helper.c:70: error: =91round_mode=92 may be used uninit= ialized in this function > > A small modification helps the compiler to do its jobs. > > gcc-4.4 does not need this, but is still not standard on all platforms. > > Signed-off-by: Stefan Weil Acked-by: Laurent Desnogues > --- > =A0target-alpha/helper.c | =A0 =A01 + > =A01 files changed, 1 insertions(+), 0 deletions(-) > > diff --git a/target-alpha/helper.c b/target-alpha/helper.c > index a658f97..be7d37b 100644 > --- a/target-alpha/helper.c > +++ b/target-alpha/helper.c > @@ -95,6 +95,7 @@ void cpu_alpha_store_fpcr (CPUState *env, uint64_t val) > =A0 =A0 =A0 =A0 round_mode =3D float_round_nearest_even; > =A0 =A0 =A0 =A0 break; > =A0 =A0 case 3: > + =A0 =A0default: /* this avoids a gcc (< 4.4) warning */ > =A0 =A0 =A0 =A0 round_mode =3D float_round_up; > =A0 =A0 =A0 =A0 break; > =A0 =A0 } > -- > 1.6.5 > > > >