From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:45936) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ShHXc-0008HG-2H for qemu-devel@nongnu.org; Wed, 20 Jun 2012 05:49:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ShHXV-0004Rt-JY for qemu-devel@nongnu.org; Wed, 20 Jun 2012 05:49:35 -0400 Received: from mx1.redhat.com ([209.132.183.28]:34372) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ShHXV-0004RM-BW for qemu-devel@nongnu.org; Wed, 20 Jun 2012 05:49:29 -0400 Message-ID: <4FE19CA4.8070100@redhat.com> Date: Wed, 20 Jun 2012 11:49:24 +0200 From: Kevin Wolf MIME-Version: 1.0 References: <1340179371-8128-1-git-send-email-kwolf@redhat.com> <89AC45BC-F5DE-4202-8C39-08BCA37424D0@suse.de> In-Reply-To: <89AC45BC-F5DE-4202-8C39-08BCA37424D0@suse.de> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] raw-posix: Fix build without is_allocated support List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alexander Graf Cc: qemu-devel@nongnu.org Am 20.06.2012 11:36, schrieb Alexander Graf: > > On 20.06.2012, at 10:02, Kevin Wolf wrote: > >> Move the declaration of s into the #ifdef sections that actually make >> use of it. >> >> Signed-off-by: Kevin Wolf > > Yup, that fixes it for me. Btw, when did we start declaring variables within actual code? Most of the QEMU code follows the "variables have to be declared on the top of a block" methodology. Yes, and generally I think this is good style because it improves readability. I see #ifdef blocks as an exception because logically and visually they are separate blocks, even though they aren't in C. But C99 allows this, so why not use it in this case. (And I think you can find more examples like this in qemu where it's used with #ifdef) > Tested-by: Alexander Graf Thanks for testing. Just out of curiosity, which host platform did you even use to get the fallback case? Kevin