On 20.06.2012, at 11:49, Kevin Wolf wrote: > 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)
Well, had I known that this is valid coding style wise, I could've simplified a bit of ppc kvm code, where we duplicate the #ifdef - once for the definition and once for the actual code. > >> 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? This is on my PPC test machine, which is running openSUSE 11.1, which is the last released openSUSE PPC version :). Alex