All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Compiler warning in grub_cmdline_get
@ 2009-08-26 23:55 Colin Watson
  2009-08-28 12:48 ` Robert Millan
  0 siblings, 1 reply; 3+ messages in thread
From: Colin Watson @ 2009-08-26 23:55 UTC (permalink / raw)
  To: grub-devel

I don't think this can actually cause a real problem, but it's a
compiler warning since it might (e.g. if prompt ever contained "%").

  /home/cjwatson/src/ubuntu/grub2/tmp/grub2-1.96+20090826/normal/cmdline.c: In function ‘grub_cmdline_get’:
  /home/cjwatson/src/ubuntu/grub2/tmp/grub2-1.96+20090826/normal/cmdline.c:276: warning: format not a string literal and no format arguments

2009-08-27  Colin Watson  <cjwatson@ubuntu.com>

	* normal/cmdline.c (grub_cmdline_get): Supply a format string as
	the first argument to grub_printf.

Index: normal/cmdline.c
===================================================================
--- normal/cmdline.c	(revision 2535)
+++ normal/cmdline.c	(working copy)
@@ -273,7 +273,7 @@
   if ((grub_getxy () >> 8) != 0)
     grub_putchar ('\n');
 
-  grub_printf (prompt);
+  grub_printf ("%s", prompt);
 
   xpos = plen;
   ystart = ypos = (grub_getxy () & 0xFF);

-- 
Colin Watson                                       [cjwatson@ubuntu.com]



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

end of thread, other threads:[~2009-08-28 13:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-26 23:55 [PATCH] Compiler warning in grub_cmdline_get Colin Watson
2009-08-28 12:48 ` Robert Millan
2009-08-28 13:25   ` Colin Watson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.