printf() pedant - do not pass variable alone, use %s.

idea from openbsd.  after looking at freebsd commit msgs from kris@freebsd.
This commit is contained in:
itojun 2000-07-10 10:19:25 +00:00
parent 4806b1729d
commit d303927592
4 changed files with 14 additions and 14 deletions

View File

@ -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)");

View File

@ -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

View File

@ -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;

View File

@ -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)