On Thu, 21 Aug 2014 21:03:09 +0800 <arei.gong...@huawei.com> wrote: > From: Gonglei <arei.gong...@huawei.com> > > error: 'i' undeclared (first use in this function) > > Signed-off-by: Gonglei <arei.gong...@huawei.com>
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 >