[libvirt] [PATCH] build: fix typo in debug message

Eric Blake eblake at redhat.com
Tue Oct 2 13:00:32 UTC 2012


On 10/02/2012 06:39 AM, Eric Blake wrote:
> Introduced in commit 0caccb58.
> 
>   CC     libvirt_driver_qemu_impl_la-qemu_capabilities.lo
> ../../src/qemu/qemu_capabilities.c: In function 'qemuCapsInitQMP':
> ../../src/qemu/qemu_capabilities.c:2327:13: error: format '%d' expects argument of type 'int', but argument 8 has type 'const char *' [-Werror=format]
> 

>          if ((rc = virPidFileReadPath(pidfile, &pid)) < 0) {
> -            VIR_DEBUG("Failed to read pidfile %s: %d",
> +            VIR_DEBUG("Failed to read pidfile %s: %s",
>                        pidfile, virStrerror(-rc, ebuf, sizeof(ebuf)));

And in part caused by the fact that gcc 4.5 is still in quite common use
(RHEL 6.3 is still at gcc 4.4, in fact), but my sledgehammer in commit
c579d6b to silence spurious warnings from gcc 4.2 also killed useful
warnings in all but gcc 4.6 and beyond.  I'll see if I can rewrite that
virt-compile-warnings.m4 patch to be more fine-grained, and only disable
-Wformat for gcc 4.2 but not 4.5.

-- 
Eric Blake   eblake at redhat.com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 617 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20121002/61fad620/attachment-0001.sig>


More information about the libvir-list mailing list