
Charles Duffy wrote:
On Fri, Sep 18, 2009 at 1:53 AM, Chris Lalancette <clalance@redhat.com <mailto:clalance@redhat.com>> wrote:
> diff --git a/src/qemu_driver.c b/src/qemu_driver.c > index a65334f..ff30421 100644 > --- a/src/qemu_driver.c > +++ b/src/qemu_driver.c > @@ -3912,10 +3912,15 @@ static int qemudDomainSave(virDomainPtr dom, > goto cleanup; > } > > - if (STREQ (prog, "raw")) > + const char *args;
I think you'll get a warning about "mixing code and data" here. At least, it's not at the top of a block, so we should move it to the top of a block.
I would have done that, but as I recall we're already declaring const char *prog immediately before its first use rather than at the top of a block, so I presumed we're using compile-time options which suppress that warning already. I'll double-check what's going on when I get back to the office.
No, you are right. This was part of the refactoring, and I just didn't re-read the code. I would prefer to move prog to the top of the block myself, and add args there; it just seems tidier. -- Chris Lalancette