All of lore.kernel.org
 help / color / mirror / Atom feed
From: Richard Laager <rlaager@wiktel.com>
To: grub-devel@gnu.org
Subject: [PATCH] Fix format-security compile warnings/errors
Date: Wed, 01 Feb 2012 00:45:21 -0600	[thread overview]
Message-ID: <1328078721.2878.291.camel@watermelon.coderich.net> (raw)


[-- Attachment #1.1: Type: text/plain, Size: 173 bytes --]

The attached trivial patch fixes a couple of format-security
warnings/errors (if -Werror=format-security is set, as is becoming more
popular on distros).

-- 
Richard

[-- Attachment #1.2: compile-warnings.patch --]
[-- Type: text/x-patch, Size: 1409 bytes --]

Index: grub/util/grub-mkimage.c
===================================================================
--- grub.orig/util/grub-mkimage.c	2012-01-31 00:31:31.409215919 -0600
+++ grub/util/grub-mkimage.c	2012-01-31 00:31:42.060047000 -0600
@@ -1821,7 +1821,7 @@
 
   if (!image_target)
     {
-      printf (_("Target format not specified (use the -O option).\n"));
+      printf ("%s", _("Target format not specified (use the -O option).\n"));
       usage (1);
     }
 
Index: grub/util/grub-mkrelpath.c
===================================================================
--- grub.orig/util/grub-mkrelpath.c	2012-01-31 00:31:34.493209927 -0600
+++ grub/util/grub-mkrelpath.c	2012-01-31 00:31:49.276858000 -0600
@@ -89,7 +89,7 @@
 
   if (optind >= argc)
     {
-      fprintf (stderr, _("No path is specified.\n"));
+      fprintf (stderr, "%s", _("No path is specified.\n"));
       usage (1);
     }
 
Index: grub/util/grub-probe.c
===================================================================
--- grub.orig/util/grub-probe.c	2012-01-31 00:32:06.329166567 -0600
+++ grub/util/grub-probe.c	2012-01-31 00:32:12.627705000 -0600
@@ -746,7 +746,7 @@
   /* Obtain ARGUMENT.  */
   if (optind >= argc)
     {
-      fprintf (stderr, _("No path or device is specified.\n"));
+      fprintf (stderr, "%s", _("No path or device is specified.\n"));
       usage (1);
     }
 

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

             reply	other threads:[~2012-02-01  6:45 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-01  6:45 Richard Laager [this message]
2012-02-03 10:07 ` [PATCH] Fix format-security compile warnings/errors Vladimir 'φ-coder/phcoder' Serbinenko
2012-02-04 20:48   ` Richard Laager

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=1328078721.2878.291.camel@watermelon.coderich.net \
    --to=rlaager@wiktel.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.