summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoritojun <itojun@NetBSD.org>2000-07-10 10:19:25 +0000
committeritojun <itojun@NetBSD.org>2000-07-10 10:19:25 +0000
commitf6138c99bc04c12506713ae9badd0552ddfc22e5 (patch)
tree59c555f174e5e4a97d62b958f2a298e0ff2ad570
parentf17668aabd740a830bddace04403bbcfdfd78de0 (diff)
downloadbsdgames-darwin-f6138c99bc04c12506713ae9badd0552ddfc22e5.tar.gz
bsdgames-darwin-f6138c99bc04c12506713ae9badd0552ddfc22e5.tar.zst
bsdgames-darwin-f6138c99bc04c12506713ae9badd0552ddfc22e5.zip
printf() pedant - do not pass variable alone, use %s.
idea from openbsd. after looking at freebsd commit msgs from kris@freebsd.
-rw-r--r--hack/hack.tty.c6
-rw-r--r--monop/getinp.c8
-rw-r--r--rogue/message.c6
-rw-r--r--trek/phaser.c8
4 files changed, 14 insertions, 14 deletions
diff --git a/hack/hack.tty.c b/hack/hack.tty.c
index 5259258e..f979e903 100644
--- a/hack/hack.tty.c
+++ b/hack/hack.tty.c
@@ -1,4 +1,4 @@
-/* $NetBSD: hack.tty.c,v 1.6 1997/10/19 16:59:17 christos Exp $ */
+/* $NetBSD: hack.tty.c,v 1.7 2000/07/10 10:19:25 itojun Exp $ */
/*-
* Copyright (c) 1988, 1993
@@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)hack.tty.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: hack.tty.c,v 1.6 1997/10/19 16:59:17 christos Exp $");
+__RCSID("$NetBSD: hack.tty.c,v 1.7 2000/07/10 10:19:25 itojun Exp $");
#endif
#endif /* not lint */
@@ -98,7 +98,7 @@ settty(s)
clear_screen();
end_screen();
if (s)
- printf(s);
+ printf("%s", s);
(void) fflush(stdout);
if (tcsetattr(0, TCSADRAIN, &inittyb) < 0)
perror("Hack (settty)");
diff --git a/monop/getinp.c b/monop/getinp.c
index 8976ba2f..66457448 100644
--- a/monop/getinp.c
+++ b/monop/getinp.c
@@ -1,4 +1,4 @@
-/* $NetBSD: getinp.c,v 1.8 1999/09/08 21:17:51 jsm Exp $ */
+/* $NetBSD: getinp.c,v 1.9 2000/07/10 10:19:26 itojun Exp $ */
/*
* Copyright (c) 1980, 1993
@@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)getinp.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: getinp.c,v 1.8 1999/09/08 21:17:51 jsm Exp $");
+__RCSID("$NetBSD: getinp.c,v 1.9 2000/07/10 10:19:26 itojun Exp $");
#endif
#endif /* not lint */
@@ -63,7 +63,7 @@ getinp(prompt, list)
for (;;) {
inter:
- printf(prompt);
+ printf("%s", prompt);
for (sp = buf; (c=getchar()) != '\n'; ) {
*sp = c;
if (c == -1) /* check for interupted system call */
@@ -84,7 +84,7 @@ inter:
printf("<RETURN>");
}
else
- printf(list[i]);
+ printf("%s", list[i]);
if (list[i+1])
printf(", ");
else
diff --git a/rogue/message.c b/rogue/message.c
index 22bf2a4c..17af007c 100644
--- a/rogue/message.c
+++ b/rogue/message.c
@@ -1,4 +1,4 @@
-/* $NetBSD: message.c,v 1.7 1998/11/10 13:01:32 hubertf Exp $ */
+/* $NetBSD: message.c,v 1.8 2000/07/10 10:19:27 itojun Exp $ */
/*
* Copyright (c) 1988, 1993
@@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)message.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: message.c,v 1.7 1998/11/10 13:01:32 hubertf Exp $");
+__RCSID("$NetBSD: message.c,v 1.8 2000/07/10 10:19:27 itojun Exp $");
#endif
#endif /* not lint */
@@ -209,7 +209,7 @@ rgetchar()
break;
#ifdef UNIX_BSD4_2
case '\032':
- printf(CL);
+ printf("%s", CL);
fflush(stdout);
tstp();
break;
diff --git a/trek/phaser.c b/trek/phaser.c
index 96ef5372..8fe19250 100644
--- a/trek/phaser.c
+++ b/trek/phaser.c
@@ -1,4 +1,4 @@
-/* $NetBSD: phaser.c,v 1.7 1999/09/08 21:45:33 jsm Exp $ */
+/* $NetBSD: phaser.c,v 1.8 2000/07/10 10:19:27 itojun Exp $ */
/*
* Copyright (c) 1980, 1993
@@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)phaser.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: phaser.c,v 1.7 1999/09/08 21:45:33 jsm Exp $");
+__RCSID("$NetBSD: phaser.c,v 1.8 2000/07/10 10:19:27 itojun Exp $");
#endif
#endif /* not lint */
@@ -140,13 +140,13 @@ phaser(v)
{
if (damaged(COMPUTER))
{
- printf(Device[COMPUTER].name);
+ printf("%s", Device[COMPUTER].name);
manual++;
}
else
if (damaged(SRSCAN))
{
- printf(Device[SRSCAN].name);
+ printf("%s", Device[SRSCAN].name);
manual++;
}
if (manual)