From: Colin Watson <cjwatson@ubuntu.com>
To: grub-devel@gnu.org
Subject: [PATCH] Compiler warning in grub_cmdline_get
Date: Thu, 27 Aug 2009 00:55:18 +0100 [thread overview]
Message-ID: <20090826235518.GV11691@riva.ucam.org> (raw)
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]
next reply other threads:[~2009-08-26 23:55 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-26 23:55 Colin Watson [this message]
2009-08-28 12:48 ` [PATCH] Compiler warning in grub_cmdline_get Robert Millan
2009-08-28 13:25 ` Colin Watson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090826235518.GV11691@riva.ucam.org \
--to=cjwatson@ubuntu.com \
--cc=grub-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.