[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] Compiler warning in grub_cmdline_get
From: |
Colin Watson |
Subject: |
[PATCH] Compiler warning in grub_cmdline_get |
Date: |
Thu, 27 Aug 2009 00:55:18 +0100 |
User-agent: |
Mutt/1.5.18 (2008-05-17) |
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 <address@hidden>
* 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 address@hidden
- [PATCH] Compiler warning in grub_cmdline_get,
Colin Watson <=