[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] monitor: fix debug print compiling error
From: |
Peter Crosthwaite |
Subject: |
Re: [Qemu-devel] [PATCH] monitor: fix debug print compiling error |
Date: |
Thu, 21 Aug 2014 22:53:55 +1000 |
On Thu, Aug 21, 2014 at 10:47 PM, <address@hidden> wrote:
> From: Gonglei <address@hidden>
>
> error: 'i' undeclared (first use in this function)
>
> Signed-off-by: Gonglei <address@hidden>
> ---
> 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
>
>
>