qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] Fix compilation with -Werror=format-security
@ 2008-12-27 19:52 Frederik Himpe
  2008-12-27 20:04 ` Lennert Buytenhek
  0 siblings, 1 reply; 3+ messages in thread
From: Frederik Himpe @ 2008-12-27 19:52 UTC (permalink / raw)
  To: qemu-devel; +Cc: kvm

Mandriva is now using the -Werror=format-security CFLAG by default. To 
make kvm 82 compile with this option, I had to apply this patch:
http://svn.mandriva.com/cgi-bin/viewvc.cgi/packages/cooker/kvm/current/SOURCES/kvm-82-format-string.patch?view=co

By the way, is there any reason why the following patch was never
applied?

http://lists.gnu.org/archive/html/qemu-devel/2008-11/msg00116.html

-- 
Frederik Himpe

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] Fix compilation with -Werror=format-security
  2008-12-27 19:52 [Qemu-devel] Fix compilation with -Werror=format-security Frederik Himpe
@ 2008-12-27 20:04 ` Lennert Buytenhek
  2008-12-28 13:24   ` Blue Swirl
  0 siblings, 1 reply; 3+ messages in thread
From: Lennert Buytenhek @ 2008-12-27 20:04 UTC (permalink / raw)
  To: qemu-devel; +Cc: kvm

On Sat, Dec 27, 2008 at 07:52:39PM +0000, Frederik Himpe wrote:

> Mandriva is now using the -Werror=format-security CFLAG by default. To 
> make kvm 82 compile with this option, I had to apply this patch:
> http://svn.mandriva.com/cgi-bin/viewvc.cgi/packages/cooker/kvm/current/SOURCES/kvm-82-format-string.patch?view=co

	diff -ur kvm-82.orig/qemu/monitor.c kvm-82/qemu/monitor.c
	--- kvm-82.orig/qemu/monitor.c	2008-12-24 15:24:58.000000000 +0100
	+++ kvm-82/qemu/monitor.c	2008-12-27 20:19:32.000000000 +0100
	@@ -1975,7 +1975,7 @@
	 
	 static void expr_error(const char *fmt)
	 {
	-    term_printf(fmt);
	+    term_printf("%s", fmt);
	     term_printf("\n");
	     longjmp(expr_env, 1);
	 }

Why not make this term_printf("%s\n", fmt); while you're at it?

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] Fix compilation with -Werror=format-security
  2008-12-27 20:04 ` Lennert Buytenhek
@ 2008-12-28 13:24   ` Blue Swirl
  0 siblings, 0 replies; 3+ messages in thread
From: Blue Swirl @ 2008-12-28 13:24 UTC (permalink / raw)
  To: qemu-devel; +Cc: kvm

On 12/27/08, Lennert Buytenhek <buytenh@wantstofly.org> wrote:
> On Sat, Dec 27, 2008 at 07:52:39PM +0000, Frederik Himpe wrote:
>
>  > Mandriva is now using the -Werror=format-security CFLAG by default. To
>  > make kvm 82 compile with this option, I had to apply this patch:
>  > http://svn.mandriva.com/cgi-bin/viewvc.cgi/packages/cooker/kvm/current/SOURCES/kvm-82-format-string.patch?view=co
>
>
>         diff -ur kvm-82.orig/qemu/monitor.c kvm-82/qemu/monitor.c
>         --- kvm-82.orig/qemu/monitor.c  2008-12-24 15:24:58.000000000 +0100
>         +++ kvm-82/qemu/monitor.c       2008-12-27 20:19:32.000000000 +0100
>         @@ -1975,7 +1975,7 @@
>
>          static void expr_error(const char *fmt)
>          {
>         -    term_printf(fmt);
>         +    term_printf("%s", fmt);
>              term_printf("\n");
>              longjmp(expr_env, 1);
>          }
>
>  Why not make this term_printf("%s\n", fmt); while you're at it?

Thanks, I combined these to form r6134. As "fmt" no longer describes
the parameter, I changed that to "msg".

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-12-28 13:24 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-27 19:52 [Qemu-devel] Fix compilation with -Werror=format-security Frederik Himpe
2008-12-27 20:04 ` Lennert Buytenhek
2008-12-28 13:24   ` Blue Swirl

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).