2011/4/28 Eric Blake <eblake(a)redhat.com>:
On 04/28/2011 01:33 AM, Matthias Bolte wrote:
> libvirt compiles fine but virsh has a warning about vfprintf:
>
> virsh.c: In function 'vshDebug':
> virsh.c:12105:5: warning: function might be possible candidate for
> 'ms_printf' format attribute [-Wmissing-format-attribute]
>
> I'm no sure where to fix that.
In mingw's <stdio.h>. But we can't do that.
vfprintf is NOT being provided by gnulib, so it does NOT understand %zu
or %llu. Yet we use it with %zu.
So the only real solution is to use virAsprintf (which _does_ understand
%zu, thanks to gnulib) and make vshDebug go through an intermediate
buffer, then use fputs on that string, rather than relying directly on
the unsanitized vfprintf. Patch coming up shortly.
Yep, fixed now.
>
> make check shows two warnings in gnulib. Maybe Eric wants to take a look:
>
> getsockopt.c: In function 'rpl_getsockopt':
> getsockopt.c:51:7: warning: passing argument 4 of 'getsockopt' from
> incompatible pointer type
>
c:\dev\msys_setup\mingw\bin\../lib/gcc/mingw32/4.5.0/../../../../include/winsock2.h:543:32:
> note: expected 'char *' but argument is of type 'int *'
Yep, I can fix that one in gnulib; I'll have a counterpart patch to bump
.gnulib to the latest once I've got it done.
>
> test-getaddrinfo.c:28:1: warning: initialization from incompatible pointer type
Probably the same category of gnulib fix.
Also fixed now.
> Aside from that the rest seems to work fine.
So I fixed the non-blocking pipe issues that broke 0.9.0 virsh
out-of-the-box? Good to hear.
At least the call to virEventRegisterDefaultImpl in virsh doesn't fail
anymore, so the pipe setup and stuff seems to work, or at least does
not fail anymore. :)
Current git + pending (but already ACK'ed) patches from Eric compiles
and works fine on mingw, as far as I can tell.
Matthias