Received: from eggs.gnu.org ([140.186.70.92]:55275) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RSotr-0001uH-8r for qemu-devel@nongnu.org; Tue, 22 Nov 2011 06:52:35 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RSotn-0000rX-B9 for qemu-devel@nongnu.org; Tue, 22 Nov 2011 06:52:31 -0500 Received: from mx1.redhat.com ([209.132.183.28]:60949) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RSotn-0000rT-0q for qemu-devel@nongnu.org; Tue, 22 Nov 2011 06:52:27 -0500 From: Markus Armbruster References: Date: Tue, 22 Nov 2011 12:52:22 +0100 In-Reply-To: (Stefano Stabellini's message of "Tue, 22 Nov 2011 11:30:12 +0000") Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [Qemu-devel] Suspicious fall through in qemu_default_pixelformat() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefano Stabellini Cc: "qemu-devel@nongnu.org" Stefano Stabellini writes: > On Tue, 22 Nov 2011, Markus Armbruster wrote: >> Case 24 falls through to case 32, which overwrites all of case 24's >> work. Looks wrong. Git blames commit 0da2ea1b "fix endianness problem >> sharing the videoram buffer". >> >> Patching in a break is easy enough, but since I don't actually >> understand how the function is used, I have no idea what exactly this >> fixes. Stefano, can you help? > > You are right, there should be a break statement there. > However it doesn't matter in practice because the 24 and 32 bit settings > are the same (amask, ashift and abits don't matter much). I'll post the obvious patch then. Thanks!