From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:45399) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SXE1x-0002N0-H8 for qemu-devel@nongnu.org; Wed, 23 May 2012 12:03:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SXE1r-000811-4b for qemu-devel@nongnu.org; Wed, 23 May 2012 12:03:21 -0400 Received: from v220110690675601.yourvserver.net ([78.47.199.172]:45261) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SXE1q-00080G-Uv for qemu-devel@nongnu.org; Wed, 23 May 2012 12:03:15 -0400 Message-ID: <4FBD0A40.6040206@weilnetz.de> Date: Wed, 23 May 2012 18:03:12 +0200 From: Stefan Weil MIME-Version: 1.0 References: <1337721812-30229-1-git-send-email-sw@weilnetz.de> <4FBD026C.5040304@weilnetz.de> <4FBD0317.2040507@redhat.com> In-Reply-To: <4FBD0317.2040507@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 1.1] virtio: Fix compiler warning for non Linux hosts List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf Cc: Stefan Hajnoczi , Anthony Liguori , qemu-devel@nongnu.org, Paolo Bonzini Am 23.05.2012 17:32, schrieb Kevin Wolf: > Am 23.05.2012 17:29, schrieb Stefan Weil: >> Am 23.05.2012 10:09, schrieb Stefan Hajnoczi: >>> On Tue, May 22, 2012 at 10:23 PM, Stefan Weil wrote: >>>> The local variables ret, i are only used if __linux__ is defined. >>>> >>>> Signed-off-by: Stefan Weil >>>> --- >>>> hw/virtio-blk.c | 4 +++- >>>> 1 file changed, 3 insertions(+), 1 deletion(-) >>> The #ifdef __linux__ further down in the function declares the local >>> hdr variable. We could move ret and i down into the #ifdef instead of >>> adding a new one. >> I noticed that, but declaring variables anywhere is C++, not C code. > It's called C99. > > Kevin > Maybe, but I already had patches rejected because of that style. Did this policy change? I'd appreciate that! Stefan