From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O9NXQ-000687-G5 for qemu-devel@nongnu.org; Tue, 04 May 2010 15:12:12 -0400 Received: from [140.186.70.92] (port=33086 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O9NXO-00065U-LW for qemu-devel@nongnu.org; Tue, 04 May 2010 15:12:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O9NXN-00020x-Ae for qemu-devel@nongnu.org; Tue, 04 May 2010 15:12:10 -0400 Received: from fg-out-1718.google.com ([72.14.220.159]:17896) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O9NXN-00020p-4x for qemu-devel@nongnu.org; Tue, 04 May 2010 15:12:09 -0400 Received: by fg-out-1718.google.com with SMTP id 19so1306202fgg.10 for ; Tue, 04 May 2010 12:12:08 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: References: <20100503072448.367.7010.stgit@skyserv> <20100503072939.367.3130.stgit@skyserv> Date: Tue, 4 May 2010 23:12:07 +0400 Message-ID: Subject: Re: [Qemu-devel] [PATCH 2/3] sparc64: implement global translation table entries From: Igor Kovalenko Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Blue Swirl Cc: qemu-devel@nongnu.org On Tue, May 4, 2010 at 12:29 AM, Blue Swirl wrote: > On 5/3/10, Igor Kovalenko wrote: >> On Tue, May 4, 2010 at 12:06 AM, Blue Swirl wrote= : >> =A0> On 5/3/10, Igor V. Kovalenko wrote: >> =A0>> From: Igor V. Kovalenko >> =A0>> >> =A0>> =A0- match global tte against any context >> =A0>> =A0- show global tte in MMU dump >> =A0>> >> =A0>> =A0Signed-off-by: Igor V. Kovalenko >> =A0> >> =A0> I get this error: >> =A0> =A0CC =A0 =A0sparc64-softmmu/op_helper.o >> =A0> cc1: warnings being treated as errors >> =A0> /src/qemu/target-sparc/op_helper.c: In function 'demap_tlb': >> =A0> /src/qemu/target-sparc/op_helper.c:129: error: 'context' may be use= d >> =A0> uninitialized in this function >> =A0> >> >> >> My gcc (Gentoo 4.4.3-r2 p1.2) is silent, and looking at the change all >> =A04 possible cases are handled in switch statement. > > I think gcc is not intelligent enough to know that x & 3 has only 4 > possible cases. :-) > >> =A0It should initializes context in 3 usable cases and returns from the >> =A04th which is reserved. >> =A0How do we fix this issue? > > I'd add a default case to one of the cases. Another possibility is to > initialize the context with 0 and then make one of the cases empty. > Added default case, resent this patch only. --=20 Kind regards, Igor V. Kovalenko