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 <kw...@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 <ag...@suse.de> Thanks for testing. Just out of curiosity, which host platform did you even use to get the fallback case? Kevin