[libvirt] Patch: Fix build with -Werror=format-security cflag

This patch is needed to build libvirt with -Werror=format-security gcc cflag, which is used by default on Mandriva diff -ur libvirt-0.6.3.orig/src/virsh.c libvirt-0.6.3/src/virsh.c --- libvirt-0.6.3.orig/src/virsh.c 2009-04-15 21:43:26.000000000 +0200 +++ libvirt-0.6.3/src/virsh.c 2009-05-02 13:56:11.000000000 +0200 @@ -4463,7 +4463,7 @@ } /* Print this device */ - vshPrint(ctl, indentBuf); + vshPrint(ctl, "%s", indentBuf); vshPrint(ctl, "%s\n", devices[devid]); @@ -4487,7 +4487,7 @@ /* If there is a child device, then print another blank line */ if (nextlastdev != -1) { - vshPrint(ctl, indentBuf); + vshPrint(ctl, "%s", indentBuf); vshPrint(ctl, " |\n"); } @@ -4511,7 +4511,7 @@ /* If there was no child device, and we're the last in * a list of devices, then print another blank line */ if (nextlastdev == -1 && devid == lastdev) { - vshPrint(ctl, indentBuf); + vshPrint(ctl, "%s", indentBuf); vshPrint(ctl, "\n"); } }

On Sat, May 02, 2009 at 04:25:58PM +0000, Frederik Himpe wrote:
This patch is needed to build libvirt with -Werror=format-security gcc cflag, which is used by default on Mandriva
I already applied this same fix to CVS last week.... Daniel -- |: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :| |: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|
participants (2)
-
Daniel P. Berrange
-
Frederik Himpe