From: Kevin Wolf <kwolf@redhat.com>
To: Alexander Graf <agraf@suse.de>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] raw-posix: Fix build without is_allocated support
Date: Wed, 20 Jun 2012 11:49:24 +0200 [thread overview]
Message-ID: <4FE19CA4.8070100@redhat.com> (raw)
In-Reply-To: <89AC45BC-F5DE-4202-8C39-08BCA37424D0@suse.de>
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 <kwolf@redhat.com>
>
> 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 <agraf@suse.de>
Thanks for testing. Just out of curiosity, which host platform did you
even use to get the fallback case?
Kevin
next prev parent reply other threads:[~2012-06-20 9:49 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-20 8:02 [Qemu-devel] [PATCH] raw-posix: Fix build without is_allocated support Kevin Wolf
2012-06-20 9:36 ` Alexander Graf
2012-06-20 9:49 ` Kevin Wolf [this message]
2012-06-20 9:53 ` Alexander Graf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4FE19CA4.8070100@redhat.com \
--to=kwolf@redhat.com \
--cc=agraf@suse.de \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.