[libvirt] [PATCH] fix diagnostic when execute openvz commands
Daniel Veillard
veillard at redhat.com
Thu Jul 10 12:27:25 UTC 2008
On Thu, Jul 10, 2008 at 09:23:36AM +0200, Jim Meyering wrote:
> Evgeniy Sokolov <evg at openvz.org> wrote:
[...]
> > +void
> > +error (virConnectPtr conn, virErrorNumber code, const char *fmt, ...)
>
> Now that you've given it external scope, please use a different name.
> There are already at least two other "error" functions,
> including the static one in remote_internal.c, and the
> external one in glibc/gnulib.
Hum, maybe we could just rename the one in remote_internal.c to rem_error()
to avoid confusion.
[...]
> > +void error (virConnectPtr conn, virErrorNumber code, const char *fmt, ...);
>
> Whatever its name, please do two more things:
>
> - add "ATTRIBUTE_FORMAT(printf, 3, 4)" before the semicolon, so that
> gcc -Wformat compares the format string with types of corresponding arguments.
> (this must be done with any varargs "..." printf/scanf-style function)
>
> - add the new name to the list in Makefile.cfg (msg_gen_function),
> and ensure that "make syntax-check" passes.
> (this must be done for any function that takes a diagnostic
> string as an argument)
Everything seems fixed with his latest patch :-)
thanks I completely missed those points !
Daniel
--
Red Hat Virtualization group http://redhat.com/virtualization/
Daniel Veillard | virtualization library http://libvirt.org/
veillard at redhat.com | libxml GNOME XML XSLT toolkit http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/
More information about the libvir-list
mailing list