qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 1.1] virtio: Fix compiler warning for non Linux


From: Kevin Wolf
Subject: Re: [Qemu-devel] [PATCH 1.1] virtio: Fix compiler warning for non Linux hosts
Date: Wed, 30 May 2012 09:39:22 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:12.0) Gecko/20120430 Thunderbird/12.0.1

Am 30.05.2012 09:33, schrieb Stefan Hajnoczi:
> On Wed, May 30, 2012 at 3:26 AM, Anthony Liguori <address@hidden> wrote:
>> 3) It's not how the rest of QEMU is written.  Consistency is the most
>> important purpose of Coding Style.
>>
>> (3) is the most important consideration of all.
> 
> Fair enough if its a style choice and you want QEMU to be consistent.
> I'd love to use them because they keep variables and the code that
> uses them together - great for checking that correct types are being
> used during code review and also less noise in the patch.
> 
> So if you ever change your mind about this, let me know and I'll never
> declare a variable at the start of a function again :D.

You would have to find ways to bypass the block maintainer. ;-)

I generally think it's good style to keep declarations together at the
top of a block. Except sometimes. (And in some cases like VLAs it can
even be necessary to have them in the middle of a function)

Kevin



reply via email to

[Prev in Thread] Current Thread [Next in Thread]