diff options
| author | is <is@NetBSD.org> | 2000-10-10 19:54:37 +0000 |
|---|---|---|
| committer | is <is@NetBSD.org> | 2000-10-10 19:54:37 +0000 |
| commit | 48052d04a3a4c22d3ffae1aa36157f7e2dddd132 (patch) | |
| tree | 32b2a60211b697bcf1a97dc4452098d02069b10d /libexec | |
| parent | a9006f3ed58c26fc67be5b5764c9d3a5beafa63c (diff) | |
Format string cleanups by sommerfeld.
Diffstat (limited to 'libexec')
| -rw-r--r-- | libexec/Makefile.inc | 3 | ||||
| -rw-r--r-- | libexec/ld.elf_so/rtld.h | 5 | ||||
| -rw-r--r-- | libexec/mail.local/mail.local.c | 7 | ||||
| -rw-r--r-- | libexec/rexecd/rexecd.c | 7 | ||||
| -rw-r--r-- | libexec/rmail/rmail.c | 7 | ||||
| -rw-r--r-- | libexec/rshd/rshd.c | 7 | ||||
| -rw-r--r-- | libexec/telnetd/state.c | 12 | ||||
| -rw-r--r-- | libexec/telnetd/utility.c | 12 |
8 files changed, 33 insertions, 27 deletions
diff --git a/libexec/Makefile.inc b/libexec/Makefile.inc index 2fadbc7f8a8..4f659fa16da 100644 --- a/libexec/Makefile.inc +++ b/libexec/Makefile.inc @@ -1,5 +1,6 @@ -# $NetBSD: Makefile.inc,v 1.4 1997/10/08 09:07:12 mrg Exp $ +# $NetBSD: Makefile.inc,v 1.5 2000/10/10 19:54:37 is Exp $ # @(#)Makefile.inc 8.1 (Berkeley) 6/4/93 BINDIR?= /usr/libexec WARNS?= 1 +WFORMAT?= 2 diff --git a/libexec/ld.elf_so/rtld.h b/libexec/ld.elf_so/rtld.h index 9ff719abf66..6f3d816a341 100644 --- a/libexec/ld.elf_so/rtld.h +++ b/libexec/ld.elf_so/rtld.h @@ -1,4 +1,4 @@ -/* $NetBSD: rtld.h,v 1.27 2000/07/26 02:07:35 mycroft Exp $ */ +/* $NetBSD: rtld.h,v 1.28 2000/10/10 19:54:38 is Exp $ */ /* * Copyright 1996 John D. Polstra. @@ -236,7 +236,8 @@ extern Elf_Sym _rtld_sym_zero; void _rtld_bind_start __P((void)); /* rtld.c */ -void _rtld_error __P((const char *, ...)); +void _rtld_error __P((const char *, ...)) + __attribute__((__format__(__printf__,1,2))); void _rtld_die __P((void)); char *_rtld_dlerror __P((void)); void *_rtld_dlopen __P((const char *, int)); diff --git a/libexec/mail.local/mail.local.c b/libexec/mail.local/mail.local.c index 48dfd35f972..c52203e99d9 100644 --- a/libexec/mail.local/mail.local.c +++ b/libexec/mail.local/mail.local.c @@ -1,4 +1,4 @@ -/* $NetBSD: mail.local.c,v 1.16 1998/08/10 02:57:23 perry Exp $ */ +/* $NetBSD: mail.local.c,v 1.17 2000/10/10 19:54:38 is Exp $ */ /*- * Copyright (c) 1990, 1993, 1994 @@ -40,7 +40,7 @@ __COPYRIGHT("@(#) Copyright (c) 1990, 1993, 1994\n\ #if 0 static char sccsid[] = "@(#)mail.local.c 8.22 (Berkeley) 6/21/95"; #else -__RCSID("$NetBSD: mail.local.c,v 1.16 1998/08/10 02:57:23 perry Exp $"); +__RCSID("$NetBSD: mail.local.c,v 1.17 2000/10/10 19:54:38 is Exp $"); #endif #endif /* not lint */ @@ -67,7 +67,8 @@ __RCSID("$NetBSD: mail.local.c,v 1.16 1998/08/10 02:57:23 perry Exp $"); #define NOTFATAL 0 int deliver __P((int, char *, int)); -void err __P((int, const char *, ...)); +void err __P((int, const char *, ...)) + __attribute__((__format__(__printf__, 2, 3))); void notifybiff __P((char *)); int store __P((const char *)); void usage __P((void)); diff --git a/libexec/rexecd/rexecd.c b/libexec/rexecd/rexecd.c index 1af2e71fc35..b0108150d9f 100644 --- a/libexec/rexecd/rexecd.c +++ b/libexec/rexecd/rexecd.c @@ -1,4 +1,4 @@ -/* $NetBSD: rexecd.c,v 1.6 1998/07/26 19:49:03 mycroft Exp $ */ +/* $NetBSD: rexecd.c,v 1.7 2000/10/10 19:54:38 is Exp $ */ /* * Copyright (c) 1983, 1993 @@ -40,7 +40,7 @@ __COPYRIGHT("@(#) Copyright (c) 1983, 1993\n\ #if 0 static char sccsid[] = "from: @(#)rexecd.c 8.1 (Berkeley) 6/4/93"; #else -__RCSID("$NetBSD: rexecd.c,v 1.6 1998/07/26 19:49:03 mycroft Exp $"); +__RCSID("$NetBSD: rexecd.c,v 1.7 2000/10/10 19:54:38 is Exp $"); #endif #endif /* not lint */ @@ -64,7 +64,8 @@ __RCSID("$NetBSD: rexecd.c,v 1.6 1998/07/26 19:49:03 mycroft Exp $"); #include <string.h> #include <unistd.h> -void error __P((const char *, ...)); +void error __P((const char *, ...)) + __attribute__((__format__(__printf__, 1, 2))); int main __P((int, char **)); void doit __P((int, struct sockaddr_in *)); void getstr __P((char *, int, char *)); diff --git a/libexec/rmail/rmail.c b/libexec/rmail/rmail.c index c729d766ae8..f9d4724cd3f 100644 --- a/libexec/rmail/rmail.c +++ b/libexec/rmail/rmail.c @@ -1,4 +1,4 @@ -/* $NetBSD: rmail.c,v 1.13 1999/01/11 22:40:00 kleink Exp $ */ +/* $NetBSD: rmail.c,v 1.14 2000/10/10 19:54:39 is Exp $ */ /* * Copyright (c) 1988, 1993 @@ -40,7 +40,7 @@ __COPYRIGHT("@(#) Copyright (c) 1988, 1993\n\ #if 0 static char sccsid[] = "@(#)rmail.c 8.3 (Berkeley) 5/15/95"; #else -__RCSID("$NetBSD: rmail.c,v 1.13 1999/01/11 22:40:00 kleink Exp $"); +__RCSID("$NetBSD: rmail.c,v 1.14 2000/10/10 19:54:39 is Exp $"); #endif #endif /* not lint */ @@ -86,7 +86,8 @@ __RCSID("$NetBSD: rmail.c,v 1.13 1999/01/11 22:40:00 kleink Exp $"); # define MAX(a, b) ((a) < (b) ? (b) : (a)) #endif -void err __P((int, const char *, ...)); +void err __P((int, const char *, ...)) + __attribute((__format__(__printf__, 2, 3))); void usage __P((void)); int main __P((int, char *[])); diff --git a/libexec/rshd/rshd.c b/libexec/rshd/rshd.c index 29d49af607a..74969efff4c 100644 --- a/libexec/rshd/rshd.c +++ b/libexec/rshd/rshd.c @@ -1,4 +1,4 @@ -/* $NetBSD: rshd.c,v 1.19 2000/04/14 12:28:51 itojun Exp $ */ +/* $NetBSD: rshd.c,v 1.20 2000/10/10 19:54:39 is Exp $ */ /* * Copyright (C) 1998 WIDE Project. @@ -73,7 +73,7 @@ __COPYRIGHT("@(#) Copyright (c) 1988, 1989, 1992, 1993, 1994\n\ #if 0 static char sccsid[] = "@(#)rshd.c 8.2 (Berkeley) 4/6/94"; #else -__RCSID("$NetBSD: rshd.c,v 1.19 2000/04/14 12:28:51 itojun Exp $"); +__RCSID("$NetBSD: rshd.c,v 1.20 2000/10/10 19:54:39 is Exp $"); #endif #endif /* not lint */ @@ -114,7 +114,8 @@ int log_success; /* If TRUE, log all successful accesses */ int sent_null; void doit __P((struct sockaddr *)); -void error __P((const char *, ...)); +void error __P((const char *, ...)) + __attribute__((__format__(__printf__, 1, 2))); void getstr __P((char *, int, char *)); int local_domain __P((char *)); char *topdomain __P((char *)); diff --git a/libexec/telnetd/state.c b/libexec/telnetd/state.c index 47da9060170..082f79bf5bd 100644 --- a/libexec/telnetd/state.c +++ b/libexec/telnetd/state.c @@ -1,4 +1,4 @@ -/* $NetBSD: state.c,v 1.12 2000/06/22 06:47:49 thorpej Exp $ */ +/* $NetBSD: state.c,v 1.13 2000/10/10 19:54:39 is Exp $ */ /* * Copyright (c) 1989, 1993 @@ -38,7 +38,7 @@ #if 0 static char sccsid[] = "@(#)state.c 8.5 (Berkeley) 5/30/95"; #else -__RCSID("$NetBSD: state.c,v 1.12 2000/06/22 06:47:49 thorpej Exp $"); +__RCSID("$NetBSD: state.c,v 1.13 2000/10/10 19:54:39 is Exp $"); #endif #endif /* not lint */ @@ -53,10 +53,10 @@ __RCSID("$NetBSD: state.c,v 1.12 2000/06/22 06:47:49 thorpej Exp $"); static int envvarok __P((char *)); -unsigned char doopt[] = { IAC, DO, '%', 'c', 0 }; -unsigned char dont[] = { IAC, DONT, '%', 'c', 0 }; -unsigned char will[] = { IAC, WILL, '%', 'c', 0 }; -unsigned char wont[] = { IAC, WONT, '%', 'c', 0 }; +unsigned const char doopt[] = { IAC, DO, '%', 'c', 0 }; +unsigned const char dont[] = { IAC, DONT, '%', 'c', 0 }; +unsigned const char will[] = { IAC, WILL, '%', 'c', 0 }; +unsigned const char wont[] = { IAC, WONT, '%', 'c', 0 }; int not42 = 1; /* diff --git a/libexec/telnetd/utility.c b/libexec/telnetd/utility.c index a4c6995ff5f..9f757e035a6 100644 --- a/libexec/telnetd/utility.c +++ b/libexec/telnetd/utility.c @@ -1,4 +1,4 @@ -/* $NetBSD: utility.c,v 1.14 2000/06/22 06:47:50 thorpej Exp $ */ +/* $NetBSD: utility.c,v 1.15 2000/10/10 19:54:39 is Exp $ */ /* * Copyright (c) 1989, 1993 @@ -38,7 +38,7 @@ #if 0 static char sccsid[] = "@(#)utility.c 8.4 (Berkeley) 5/30/95"; #else -__RCSID("$NetBSD: utility.c,v 1.14 2000/06/22 06:47:50 thorpej Exp $"); +__RCSID("$NetBSD: utility.c,v 1.15 2000/10/10 19:54:39 is Exp $"); #endif #endif /* not lint */ @@ -953,25 +953,25 @@ printsub(direction, pointer, length) for (i = 2; i < length; i++ ) { switch (pointer[i]) { case NEW_ENV_VAR: - sprintf(nfrontp, "\" VAR " + noquote); + sprintf(nfrontp, "%s", "\" VAR " + noquote); nfrontp += strlen(nfrontp); noquote = 2; break; case NEW_ENV_VALUE: - sprintf(nfrontp, "\" VALUE " + noquote); + sprintf(nfrontp, "%s", "\" VALUE " + noquote); nfrontp += strlen(nfrontp); noquote = 2; break; case ENV_ESC: - sprintf(nfrontp, "\" ESC " + noquote); + sprintf(nfrontp, "%s", "\" ESC " + noquote); nfrontp += strlen(nfrontp); noquote = 2; break; case ENV_USERVAR: - sprintf(nfrontp, "\" USERVAR " + noquote); + sprintf(nfrontp, "%s", "\" USERVAR " + noquote); nfrontp += strlen(nfrontp); noquote = 2; break; |
