All of lore.kernel.org
 help / color / mirror / Atom feed
From: Herton Ronaldo Krzesinski <herton@mandriva.com.br>
To: kbd@lists.altlinux.org
Subject: [kbd] [PATCH] Fix errors when building with -Werror=format-security gcc option
Date: Tue, 10 Feb 2009 11:31:55 -0200	[thread overview]
Message-ID: <200902101131.56180.herton@mandriva.com.br> (raw)

Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com.br>
---
 src/ksyms.c           |    2 +-
 src/setfont.c         |    2 +-
 src/setmetamode.c     |    2 +-
 src/showconsolefont.c |    4 ++--
 4 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/ksyms.c b/src/ksyms.c
index a322f70..35fed29 100644
--- a/src/ksyms.c
+++ b/src/ksyms.c
@@ -1662,7 +1662,7 @@ list_charsets(FILE *f) {
 			if(!strncmp(charsets[i].charset, mm[j], lth)) {
 				if(ct++)
 					fprintf(f, ",");
-				fprintf(f, charsets[i].charset+lth);
+				fprintf(f, "%s", charsets[i].charset+lth);
 			}
 		}
 		fprintf(f, "}");
diff --git a/src/setfont.c b/src/setfont.c
index af3805a..b979cb7 100644
--- a/src/setfont.c
+++ b/src/setfont.c
@@ -725,7 +725,7 @@ saveoldfontplusunicodemap(int fd, char *Ofil) {
 static void
 send_escseq(int fd, char *seq, int n) {
 	if (write(fd, seq, n) != n)  /* maybe fd is read-only */
-		printf(seq);
+		printf("%s", seq);
 }
 
 void
diff --git a/src/setmetamode.c b/src/setmetamode.c
index 4b4aab2..ecbaaa3 100644
--- a/src/setmetamode.c
+++ b/src/setmetamode.c
@@ -41,7 +41,7 @@ report(int meta) {
       default:
 	s = _("Strange mode for Meta key?\n");
     }
-    printf(s);
+    printf("%s", s);
 }
 
 struct meta {
diff --git a/src/showconsolefont.c b/src/showconsolefont.c
index 091bc3b..1ccb81b 100644
--- a/src/showconsolefont.c
+++ b/src/showconsolefont.c
@@ -188,9 +188,9 @@ main (int argc, char **argv) {
 		printf("    ");
 		for(j=0; j < cols && i+j*rows < n; j++) {
 			putchar(BASE + (i%nr)*cols+j);
-			printf(sep);
+			printf("%s", sep);
 			if (j%8 == 7)
-				printf(sep);
+				printf("%s", sep);
 		}
 		putchar('\n');
 		if (i%8 == 7)
-- 
1.6.1.3



             reply	other threads:[~2009-02-10 13:31 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-10 13:31 Herton Ronaldo Krzesinski [this message]
2009-02-11 21:43 ` [kbd] [PATCH] Fix errors when building with -Werror=format-security gcc option Alexey Gladkov

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=200902101131.56180.herton@mandriva.com.br \
    --to=herton@mandriva.com.br \
    --cc=kbd@lists.altlinux.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.