[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2] monitor: fix debug print compiling error
From: |
Luiz Capitulino |
Subject: |
Re: [Qemu-devel] [PATCH v2] monitor: fix debug print compiling error |
Date: |
Wed, 27 Aug 2014 09:06:41 -0400 |
On Thu, 21 Aug 2014 21:03:09 +0800
<address@hidden> wrote:
> From: Gonglei <address@hidden>
>
> error: 'i' undeclared (first use in this function)
>
> Signed-off-by: Gonglei <address@hidden>
Applied to the qmp branch, thanks.
> ---
> v2:
> avoid to mix code and declarations, add a pair of {}, thanks Peter.
> ---
> monitor.c | 7 +++++--
> 1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/monitor.c b/monitor.c
> index 34cee74..667efb7 100644
> --- a/monitor.c
> +++ b/monitor.c
> @@ -4747,8 +4747,11 @@ static void monitor_find_completion(void *opaque,
> return;
> }
> #ifdef DEBUG_COMPLETION
> - for (i = 0; i < nb_args; i++) {
> - monitor_printf(mon, "arg%d = '%s'\n", i, args[i]);
> + {
> + int i;
> + for (i = 0; i < nb_args; i++) {
> + monitor_printf(mon, "arg%d = '%s'\n", i, args[i]);
> + }
> }
> #endif
>