Message ID | 1319791946-15602-2-git-send-email-armbru@redhat.com |
---|---|
State | New |
Headers | show |
On Fri, Oct 28, 2011 at 10:52:25AM +0200, Markus Armbruster wrote: > C99 7.15.1: Each invocation of the va_start and va_copy macros shall > be matched by a corresponding invocation of the va_end macro in the > same function. > > Spotted by Coverity. Harmless on the (common) systems where va_end() > does nothing. > > Signed-off-by: Markus Armbruster <armbru@redhat.com> > --- > hw/sysbus.c | 2 ++ > 1 files changed, 2 insertions(+), 0 deletions(-) Thanks, applied to the trivial patches -next tree: http://repo.or.cz/w/qemu/stefanha.git/shortlog/refs/heads/trivial-patches-next Stefan
diff --git a/hw/sysbus.c b/hw/sysbus.c index 4fab5a4..fd2fc6a 100644 --- a/hw/sysbus.c +++ b/hw/sysbus.c @@ -198,6 +198,7 @@ DeviceState *sysbus_create_varargs(const char *name, sysbus_connect_irq(s, n, irq); n++; } + va_end(va); return dev; } @@ -229,6 +230,7 @@ DeviceState *sysbus_try_create_varargs(const char *name, sysbus_connect_irq(s, n, irq); n++; } + va_end(va); return dev; }
C99 7.15.1: Each invocation of the va_start and va_copy macros shall be matched by a corresponding invocation of the va_end macro in the same function. Spotted by Coverity. Harmless on the (common) systems where va_end() does nothing. Signed-off-by: Markus Armbruster <armbru@redhat.com> --- hw/sysbus.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)