* [Qemu-devel] [PATCH] monitor: fix debug print compiling error
@ 2014-08-21 12:47 arei.gonglei
2014-08-21 12:53 ` Peter Crosthwaite
0 siblings, 1 reply; 3+ messages in thread
From: arei.gonglei @ 2014-08-21 12:47 UTC (permalink / raw)
To: qemu-devel; +Cc: Gonglei, weidong.huang, lcapitulino
From: Gonglei <arei.gonglei@huawei.com>
error: 'i' undeclared (first use in this function)
Signed-off-by: Gonglei <arei.gonglei@huawei.com>
---
monitor.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/monitor.c b/monitor.c
index 34cee74..6a233e7 100644
--- a/monitor.c
+++ b/monitor.c
@@ -4747,6 +4747,7 @@ static void monitor_find_completion(void *opaque,
return;
}
#ifdef DEBUG_COMPLETION
+ int i;
for (i = 0; i < nb_args; i++) {
monitor_printf(mon, "arg%d = '%s'\n", i, args[i]);
}
--
1.7.12.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH] monitor: fix debug print compiling error
2014-08-21 12:47 [Qemu-devel] [PATCH] monitor: fix debug print compiling error arei.gonglei
@ 2014-08-21 12:53 ` Peter Crosthwaite
2014-08-21 12:55 ` Gonglei (Arei)
0 siblings, 1 reply; 3+ messages in thread
From: Peter Crosthwaite @ 2014-08-21 12:53 UTC (permalink / raw)
To: gonglei
Cc: Huangweidong (C), qemu-devel@nongnu.org Developers, Luiz Capitulino
On Thu, Aug 21, 2014 at 10:47 PM, <arei.gonglei@huawei.com> wrote:
> From: Gonglei <arei.gonglei@huawei.com>
>
> error: 'i' undeclared (first use in this function)
>
> Signed-off-by: Gonglei <arei.gonglei@huawei.com>
> ---
> monitor.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/monitor.c b/monitor.c
> index 34cee74..6a233e7 100644
> --- a/monitor.c
> +++ b/monitor.c
> @@ -4747,6 +4747,7 @@ static void monitor_find_completion(void *opaque,
> return;
> }
> #ifdef DEBUG_COMPLETION
> + int i;
You mix code and declarations when you do this. You can add a pair of
{} around the whole thing to fix.
Regards,
Peter
> for (i = 0; i < nb_args; i++) {
> monitor_printf(mon, "arg%d = '%s'\n", i, args[i]);
> }
> --
> 1.7.12.4
>
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH] monitor: fix debug print compiling error
2014-08-21 12:53 ` Peter Crosthwaite
@ 2014-08-21 12:55 ` Gonglei (Arei)
0 siblings, 0 replies; 3+ messages in thread
From: Gonglei (Arei) @ 2014-08-21 12:55 UTC (permalink / raw)
To: Peter Crosthwaite
Cc: Huangweidong (C), qemu-devel@nongnu.org Developers, Luiz Capitulino
> -----Original Message-----
> From: peter.crosthwaite@petalogix.com
> [mailto:peter.crosthwaite@petalogix.com] On Behalf Of Peter Crosthwaite
> Sent: Thursday, August 21, 2014 8:54 PM
> To: Gonglei (Arei)
> Cc: qemu-devel@nongnu.org Developers; Huangweidong (C); Luiz Capitulino
> Subject: Re: [Qemu-devel] [PATCH] monitor: fix debug print compiling error
>
> On Thu, Aug 21, 2014 at 10:47 PM, <arei.gonglei@huawei.com> wrote:
> > From: Gonglei <arei.gonglei@huawei.com>
> >
> > error: 'i' undeclared (first use in this function)
> >
> > Signed-off-by: Gonglei <arei.gonglei@huawei.com>
> > ---
> > monitor.c | 1 +
> > 1 file changed, 1 insertion(+)
> >
> > diff --git a/monitor.c b/monitor.c
> > index 34cee74..6a233e7 100644
> > --- a/monitor.c
> > +++ b/monitor.c
> > @@ -4747,6 +4747,7 @@ static void monitor_find_completion(void
> *opaque,
> > return;
> > }
> > #ifdef DEBUG_COMPLETION
> > + int i;
>
> You mix code and declarations when you do this. You can add a pair of
> {} around the whole thing to fix.
>
Got it. Thanks! Will fix it.
Best regards,
-Gonglei
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-08-21 12:56 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-21 12:47 [Qemu-devel] [PATCH] monitor: fix debug print compiling error arei.gonglei
2014-08-21 12:53 ` Peter Crosthwaite
2014-08-21 12:55 ` Gonglei (Arei)
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.