From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NXbHt-0006N7-3A for qemu-devel@nongnu.org; Wed, 20 Jan 2010 09:12:01 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NXbHo-0006Ib-7s for qemu-devel@nongnu.org; Wed, 20 Jan 2010 09:12:00 -0500 Received: from [199.232.76.173] (port=57979 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NXbHo-0006IP-20 for qemu-devel@nongnu.org; Wed, 20 Jan 2010 09:11:56 -0500 Received: from mx1.redhat.com ([209.132.183.28]:31871) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NXbHn-00045U-IA for qemu-devel@nongnu.org; Wed, 20 Jan 2010 09:11:55 -0500 Date: Wed, 20 Jan 2010 16:11:52 +0200 From: Gleb Natapov Subject: Re: [Qemu-devel] Re: [PATCH 07/17] block/vvfat.c: fix warnings with _FORTIFY_SOURCE Message-ID: <20100120141152.GK5238@redhat.com> References: <85e877202ec86dac15d392f5e88d5b5d76e3b02f.1263944807.git.quintela@redhat.com> <20100120103324.GA17856@redhat.com> <4B56ECBC.40804@redhat.com> <20100120130800.GH5238@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Kirill A. Shutemov" Cc: Kevin Wolf , Juan Quintela , Markus Armbruster , qemu-devel@nongnu.org On Wed, Jan 20, 2010 at 04:02:19PM +0200, Kirill A. Shutemov wrote: > 2010/1/20 Gleb Natapov : > > On Wed, Jan 20, 2010 at 02:03:04PM +0100, Markus Armbruster wrote: > >> "Kirill A. Shutemov" writes: > >> > No, compiler can't add anything between. 'char' is always byte-aligned. > >> > >> You got some reading to do then. > >> > > To be fair this structure is packed, but this is not the reason to write > > stupid code of course. > > In what way does it stupid? Compiler can't insert pads between two > arrays of 'char'. Because this is not wise write tricky code especially if it buys you nothing. This is not C obfuscation contest and it will bite you later. What to search where extension[] is initialized? "grep extension" will not find it! Need to change structure layout? Have to change unrelated code too, but, of course, can't even know that. So can you please tell us why that code should stay like it is now? -- Gleb.