Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-1-5]: src/usr.bin Pullup usr.bin string format fixes [is].
details: https://anonhg.NetBSD.org/src/rev/0aa1b43a563f
branches: netbsd-1-5
changeset: 489855:0aa1b43a563f
user: tv <tv%NetBSD.org@localhost>
date: Wed Oct 18 01:32:40 2000 +0000
description:
Pullup usr.bin string format fixes [is].
See "cvs log" for explicit revision numbers per file, from sommerfeld.
diffstat:
usr.bin/Makefile.inc | 4 +++-
usr.bin/cdplay/cdplay.c | 8 +++-----
usr.bin/chpass/pw_yp.c | 12 ++++++++----
usr.bin/compress/compress.c | 8 ++++----
usr.bin/error/Makefile | 4 ++--
usr.bin/error/touch.c | 13 +++++++------
usr.bin/fgen/fgen.l | 5 +++--
usr.bin/file/Makefile | 3 ++-
usr.bin/ftp/cmds.c | 18 ++++++++++++------
usr.bin/ftp/extern.h | 5 +++--
usr.bin/ftp/ftp.c | 19 ++++++++++++-------
usr.bin/hexdump/Makefile | 3 ++-
usr.bin/id/Makefile | 3 ++-
usr.bin/indent/Makefile | 4 ++--
usr.bin/jot/Makefile | 3 ++-
usr.bin/kdump/Makefile | 4 ++--
usr.bin/kdump/kdump.c | 6 +++---
usr.bin/ktruss/Makefile | 4 ++--
usr.bin/ktruss/dump.c | 6 +++---
usr.bin/lam/Makefile | 4 ++--
usr.bin/less/less/Makefile | 3 ++-
usr.bin/lex/Makefile | 4 ++--
usr.bin/lex/main.c | 10 +++++-----
usr.bin/lex/misc.c | 4 ++--
usr.bin/m4/Makefile | 3 +--
usr.bin/m4/eval.c | 6 +++---
usr.bin/make/Makefile | 4 ++--
usr.bin/make/nonints.h | 11 ++++++-----
usr.bin/make/parse.c | 12 +++++++-----
usr.bin/man/Makefile | 3 ++-
usr.bin/menuc/defs.h | 5 +++--
usr.bin/mkstr/mkstr.c | 6 +++---
usr.bin/netstat/atalk.c | 25 +++++++++++++------------
usr.bin/netstat/if.c | 8 ++++----
usr.bin/netstat/inet6.c | 18 ++++++++++--------
usr.bin/netstat/iso.c | 17 +++++++++--------
usr.bin/netstat/ns.c | 23 ++++++++++++-----------
usr.bin/netstat/route.c | 15 +++++++--------
usr.bin/nl/Makefile | 4 ++--
usr.bin/patch/Makefile | 3 ++-
usr.bin/patch/util.c | 6 +++---
usr.bin/patch/util.h | 14 +++++++++-----
usr.bin/printf/Makefile | 3 ++-
usr.bin/rdist/defs.h | 11 +++++++----
usr.bin/rdist/server.c | 7 ++++---
usr.bin/rpcgen/rpc_cout.c | 8 ++++----
usr.bin/rpcgen/rpc_hout.c | 6 +++---
usr.bin/rpcgen/rpc_main.c | 6 +++---
usr.bin/rpcgen/rpc_svcout.c | 24 ++++++++++++++----------
usr.bin/rpcgen/rpc_tblout.c | 12 ++++++------
usr.bin/rs/rs.c | 21 ++++++++++++++-------
usr.bin/sed/extern.h | 7 ++++---
usr.bin/shlock/shlock.c | 8 ++++----
usr.bin/systat/extern.h | 5 +++--
usr.bin/systat/fetch.c | 6 +++---
usr.bin/tail/extern.h | 5 +++--
usr.bin/tip/tip.c | 6 +++---
usr.bin/top/display.h | 5 +++--
usr.bin/tput/tput.c | 10 +++++-----
usr.bin/tset/tset.c | 16 +++++++++-------
usr.bin/vi/common/msg.c | 5 +++--
usr.bin/vi/ex/ex_print.c | 5 +++--
usr.bin/vi/ex/ex_visual.c | 6 +++---
usr.bin/vi/include/common_extern.h | 5 +++--
usr.bin/vi/include/ex_extern.h | 5 +++--
usr.bin/w/pr_time.c | 6 +++---
usr.bin/window/lcmd2.c | 6 +++---
usr.bin/xlint/lint1/Makefile | 4 ++--
usr.bin/xlint/lint1/externs1.h | 5 +++--
usr.bin/xlint/lint2/Makefile | 4 ++--
usr.bin/yacc/defs.h | 3 +--
usr.bin/yacc/output.c | 5 +++--
usr.bin/yacc/reader.c | 6 +++---
73 files changed, 317 insertions(+), 254 deletions(-)
diffs (truncated from 1992 to 300 lines):
diff -r 80a3470c4db4 -r 0aa1b43a563f usr.bin/Makefile.inc
--- a/usr.bin/Makefile.inc Wed Oct 18 00:39:41 2000 +0000
+++ b/usr.bin/Makefile.inc Wed Oct 18 01:32:40 2000 +0000
@@ -1,5 +1,7 @@
-# $NetBSD: Makefile.inc,v 1.5 1997/10/20 03:54:16 lukem Exp $
+# $NetBSD: Makefile.inc,v 1.5.12.1 2000/10/18 01:32:40 tv Exp $
# from: @(#)Makefile.inc 8.1 (Berkeley) 6/6/93
WARNS?= 1
+WFORMAT?= 2
+WFORMAT?= 2
BINDIR?=/usr/bin
diff -r 80a3470c4db4 -r 0aa1b43a563f usr.bin/cdplay/cdplay.c
--- a/usr.bin/cdplay/cdplay.c Wed Oct 18 00:39:41 2000 +0000
+++ b/usr.bin/cdplay/cdplay.c Wed Oct 18 01:32:40 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cdplay.c,v 1.8.2.1 2000/09/18 16:49:08 abs Exp $ */
+/* $NetBSD: cdplay.c,v 1.8.2.2 2000/10/18 01:32:40 tv Exp $ */
/*
* Copyright (c) 1999 Andrew Doran.
@@ -56,7 +56,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: cdplay.c,v 1.8.2.1 2000/09/18 16:49:08 abs Exp $");
+__RCSID("$NetBSD: cdplay.c,v 1.8.2.2 2000/10/18 01:32:40 tv Exp $");
#endif /* not lint */
#include <sys/endian.h>
@@ -285,9 +285,7 @@
} while (!arg);
if (run(cmd, arg) < 0) {
- /* XXX damned -Wall */
- char *null = NULL;
- warn(null);
+ warn(NULL);
close(fd);
fd = -1;
}
diff -r 80a3470c4db4 -r 0aa1b43a563f usr.bin/chpass/pw_yp.c
--- a/usr.bin/chpass/pw_yp.c Wed Oct 18 00:39:41 2000 +0000
+++ b/usr.bin/chpass/pw_yp.c Wed Oct 18 01:32:40 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pw_yp.c,v 1.15 1999/08/16 03:02:46 simonb Exp $ */
+/* $NetBSD: pw_yp.c,v 1.15.8.1 2000/10/18 01:32:41 tv Exp $ */
/*
* Copyright (c) 1988 The Regents of the University of California.
@@ -37,7 +37,7 @@
#if 0
static char sccsid[] = "@(#)pw_yp.c 1.0 2/2/93";
#else
-__RCSID("$NetBSD: pw_yp.c,v 1.15 1999/08/16 03:02:46 simonb Exp $");
+__RCSID("$NetBSD: pw_yp.c,v 1.15.8.1 2000/10/18 01:32:41 tv Exp $");
#endif
#endif /* not lint */
@@ -317,8 +317,12 @@
int err, eval;
{
- if (err)
- warn(name);
+ if (err) {
+ if (name)
+ warn("%s", name);
+ else
+ warn(NULL);
+ }
errx(eval, "YP passwd information unchanged");
}
diff -r 80a3470c4db4 -r 0aa1b43a563f usr.bin/compress/compress.c
--- a/usr.bin/compress/compress.c Wed Oct 18 00:39:41 2000 +0000
+++ b/usr.bin/compress/compress.c Wed Oct 18 01:32:40 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: compress.c,v 1.17 1998/10/08 01:56:28 wsanchez Exp $ */
+/* $NetBSD: compress.c,v 1.17.10.1 2000/10/18 01:32:41 tv Exp $ */
/*-
* Copyright (c) 1992, 1993
@@ -43,7 +43,7 @@
#if 0
static char sccsid[] = "@(#)compress.c 8.2 (Berkeley) 1/7/94";
#else
-__RCSID("$NetBSD: compress.c,v 1.17 1998/10/08 01:56:28 wsanchez Exp $");
+__RCSID("$NetBSD: compress.c,v 1.17.10.1 2000/10/18 01:32:41 tv Exp $");
#endif
#endif /* not lint */
@@ -65,8 +65,8 @@
#endif
void compress __P((char *, char *, int));
-void cwarn __P((const char *, ...));
-void cwarnx __P((const char *, ...));
+void cwarn __P((const char *, ...)) __attribute__((__format__(__printf__,1,2)));
+void cwarnx __P((const char *, ...)) __attribute__((__format__(__printf__,1,2)));
void decompress __P((char *, char *, int));
int permission __P((char *));
void setfile __P((char *, struct stat *));
diff -r 80a3470c4db4 -r 0aa1b43a563f usr.bin/error/Makefile
--- a/usr.bin/error/Makefile Wed Oct 18 00:39:41 2000 +0000
+++ b/usr.bin/error/Makefile Wed Oct 18 01:32:40 2000 +0000
@@ -1,7 +1,7 @@
# @(#)Makefile 8.1 (Berkeley) 6/6/93
-# $NetBSD: Makefile,v 1.3 1995/09/02 06:15:10 jtc Exp $
+# $NetBSD: Makefile,v 1.3.16.1 2000/10/18 01:32:41 tv Exp $
PROG= error
SRCS= main.c input.c pi.c subr.c filter.c touch.c
-
+WFORMAT=1
.include <bsd.prog.mk>
diff -r 80a3470c4db4 -r 0aa1b43a563f usr.bin/error/touch.c
--- a/usr.bin/error/touch.c Wed Oct 18 00:39:41 2000 +0000
+++ b/usr.bin/error/touch.c Wed Oct 18 01:32:40 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: touch.c,v 1.9 1999/11/06 15:11:46 kleink Exp $ */
+/* $NetBSD: touch.c,v 1.9.4.1 2000/10/18 01:32:41 tv Exp $ */
/*
* Copyright (c) 1980, 1993
@@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)touch.c 8.1 (Berkeley) 6/6/93";
#endif
-__RCSID("$NetBSD: touch.c,v 1.9 1999/11/06 15:11:46 kleink Exp $");
+__RCSID("$NetBSD: touch.c,v 1.9.4.1 2000/10/18 01:32:41 tv Exp $");
#endif /* not lint */
#include <sys/param.h>
@@ -173,10 +173,11 @@
if (nfiles){
someerrors++;
- fprintf(stdout, terse
- ? "%d file%s"
- : "%d file%s contain%s errors",
- nfiles, plural(nfiles), verbform(nfiles));
+ if (terse)
+ fprintf(stdout, "%d file%s", nfiles, plural(nfiles));
+ else
+ fprintf(stdout, "%d file%s contain%s errors",
+ nfiles, plural(nfiles), verbform(nfiles));
if (!terse){
FILEITERATE(fi, 1){
fprintf(stdout, "%s\"%s\" (%d)",
diff -r 80a3470c4db4 -r 0aa1b43a563f usr.bin/fgen/fgen.l
--- a/usr.bin/fgen/fgen.l Wed Oct 18 00:39:41 2000 +0000
+++ b/usr.bin/fgen/fgen.l Wed Oct 18 01:32:40 2000 +0000
@@ -1,5 +1,5 @@
%{
-/* $NetBSD: fgen.l,v 1.9 2000/04/14 06:11:07 simonb Exp $ */
+/* $NetBSD: fgen.l,v 1.9.4.1 2000/10/18 01:32:42 tv Exp $ */
/* FLEX input for FORTH input file scanner */
/*
* Copyright (c) 1998 Eduardo Horvath.
@@ -91,7 +91,8 @@
int parse_stack_ptr = 0;
int main __P((int, char *[]));
-void token_err __P((int, char *, char *, char *, ...));
+void token_err __P((int, char *, char *, char *, ...))
+ __attribute__((__format__(__printf__, 4, 5)));
YY_DECL;
int debug = 0;
diff -r 80a3470c4db4 -r 0aa1b43a563f usr.bin/file/Makefile
--- a/usr.bin/file/Makefile Wed Oct 18 00:39:41 2000 +0000
+++ b/usr.bin/file/Makefile Wed Oct 18 01:32:40 2000 +0000
@@ -1,7 +1,8 @@
-# $NetBSD: Makefile,v 1.24.4.1 2000/09/30 06:20:43 simonb Exp $
+# $NetBSD: Makefile,v 1.24.4.2 2000/10/18 01:32:42 tv Exp $
.include <bsd.own.mk>
+WFORMAT= 1
MFILESDIR= /usr/share/misc
MFILES= magic magic.mime
MAGIC= ${MFILESDIR}/magic
diff -r 80a3470c4db4 -r 0aa1b43a563f usr.bin/ftp/cmds.c
--- a/usr.bin/ftp/cmds.c Wed Oct 18 00:39:41 2000 +0000
+++ b/usr.bin/ftp/cmds.c Wed Oct 18 01:32:40 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cmds.c,v 1.87 2000/06/15 13:08:23 lukem Exp $ */
+/* $NetBSD: cmds.c,v 1.87.2.1 2000/10/18 01:32:42 tv Exp $ */
/*-
* Copyright (c) 1996-2000 The NetBSD Foundation, Inc.
@@ -107,7 +107,7 @@
#if 0
static char sccsid[] = "@(#)cmds.c 8.6 (Berkeley) 10/9/94";
#else
-__RCSID("$NetBSD: cmds.c,v 1.87 2000/06/15 13:08:23 lukem Exp $");
+__RCSID("$NetBSD: cmds.c,v 1.87.2.1 2000/10/18 01:32:42 tv Exp $");
#endif
#endif /* not lint */
@@ -1629,6 +1629,12 @@
(void)command("SITE CHMOD %s %s", argv[1], argv[2]);
}
+#define COMMAND_1ARG(argc, argv, cmd) \
+ if (argc == 1) \
+ command(cmd); \
+ else \
+ command(cmd " %s", argv[1])
+
void
do_umask(int argc, char *argv[])
{
@@ -1640,7 +1646,7 @@
return;
}
verbose = 1;
- (void)command(argc == 1 ? "SITE UMASK" : "SITE UMASK %s", argv[1]);
+ COMMAND_1ARG(argc, argv, "SITE UMASK");
verbose = oldverbose;
}
@@ -1655,7 +1661,7 @@
return;
}
verbose = 1;
- (void)command(argc == 1 ? "SITE IDLE" : "SITE IDLE %s", argv[1]);
+ COMMAND_1ARG(argc, argv, "SITE IDLE");
verbose = oldverbose;
}
@@ -1673,7 +1679,7 @@
return;
}
verbose = 1;
- (void)command(argc == 1 ? "HELP" : "HELP %s", argv[1]);
+ COMMAND_1ARG(argc, argv, "HELP");
verbose = oldverbose;
}
@@ -2438,7 +2444,7 @@
code = -1;
return;
}
- (void)command(argc > 1 ? "STAT %s" : "STAT" , argv[1]);
+ COMMAND_1ARG(argc, argv, "STAT");
}
/*
diff -r 80a3470c4db4 -r 0aa1b43a563f usr.bin/ftp/extern.h
--- a/usr.bin/ftp/extern.h Wed Oct 18 00:39:41 2000 +0000
+++ b/usr.bin/ftp/extern.h Wed Oct 18 01:32:40 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: extern.h,v 1.57 2000/06/15 13:08:25 lukem Exp $ */
+/* $NetBSD: extern.h,v 1.57.2.1 2000/10/18 01:32:43 tv Exp $ */
/*-
* Copyright (c) 1996-2000 The NetBSD Foundation, Inc.
@@ -122,7 +122,8 @@
void cmdabort(int);
void cmdtimeout(int);
void cmdscanner(void);
-int command(const char *, ...);
+int command(const char *, ...)
+ __attribute__((__format__(__printf__, 1, 2)));
#ifndef NO_EDITCOMPLETE
unsigned char complete(EditLine *, int);
void controlediting(void);
diff -r 80a3470c4db4 -r 0aa1b43a563f usr.bin/ftp/ftp.c
--- a/usr.bin/ftp/ftp.c Wed Oct 18 00:39:41 2000 +0000
+++ b/usr.bin/ftp/ftp.c Wed Oct 18 01:32:40 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ftp.c,v 1.100 2000/06/11 15:15:52 lukem Exp $ */
+/* $NetBSD: ftp.c,v 1.100.2.1 2000/10/18 01:32:43 tv Exp $ */
/*-
* Copyright (c) 1996-2000 The NetBSD Foundation, Inc.
@@ -103,7 +103,7 @@
#if 0
static char sccsid[] = "@(#)ftp.c 8.6 (Berkeley) 10/27/94";
#else
-__RCSID("$NetBSD: ftp.c,v 1.100 2000/06/11 15:15:52 lukem Exp $");
+__RCSID("$NetBSD: ftp.c,v 1.100.2.1 2000/10/18 01:32:43 tv Exp $");
#endif
#endif /* not lint */
@@ -1430,7 +1430,8 @@
switch (data_addr.su_family) {
case AF_INET:
if (epsv4 && !epsv4bad) {
- result = command(pasvcmd = "EPSV");
+ pasvcmd = "EPSV";
+ result = command("EPSV");
if (!connected)
return (1);
/*
@@ -1452,14 +1453,16 @@
}
}
Home |
Main Index |
Thread Index |
Old Index