diff options
author | ed <ed@FreeBSD.org> | 2010-01-02 10:09:20 +0000 |
---|---|---|
committer | ed <ed@FreeBSD.org> | 2010-01-02 10:09:20 +0000 |
commit | b2f13324285e9f616da10d4c1fb2d101723c07ea (patch) | |
tree | a138378761890dfbbb922442dc23d824a9740d2d | |
parent | 09818ac28e064437e7ab61eb0cd30245d17d27ea (diff) | |
download | FreeBSD-src-b2f13324285e9f616da10d4c1fb2d101723c07ea.zip FreeBSD-src-b2f13324285e9f616da10d4c1fb2d101723c07ea.tar.gz |
ANSIfy various tools in usr.bin/.
Most of these tools properly build at WARNS=6, except for their K&R
function declarations. Fix this, so we can bump WARNS as well.
-rw-r--r-- | usr.bin/ar/acpyacc.y | 12 | ||||
-rw-r--r-- | usr.bin/ar/ar.c | 8 | ||||
-rw-r--r-- | usr.bin/at/at.c | 2 | ||||
-rw-r--r-- | usr.bin/banner/banner.c | 2 | ||||
-rw-r--r-- | usr.bin/biff/biff.c | 2 | ||||
-rw-r--r-- | usr.bin/lam/lam.c | 2 | ||||
-rw-r--r-- | usr.bin/login/login.c | 8 | ||||
-rw-r--r-- | usr.bin/login/login_fbtab.c | 12 | ||||
-rw-r--r-- | usr.bin/renice/renice.c | 2 | ||||
-rw-r--r-- | usr.bin/rpcgen/rpc_hout.c | 12 | ||||
-rw-r--r-- | usr.bin/rpcgen/rpc_main.c | 4 | ||||
-rw-r--r-- | usr.bin/showmount/showmount.c | 28 | ||||
-rw-r--r-- | usr.bin/tail/misc.c | 2 |
13 files changed, 35 insertions, 61 deletions
diff --git a/usr.bin/ar/acpyacc.y b/usr.bin/ar/acpyacc.y index 686bbe2..b686c3f5 100644 --- a/usr.bin/ar/acpyacc.y +++ b/usr.bin/ar/acpyacc.y @@ -414,7 +414,7 @@ arscp_extract(struct list *list) /* List modules of archive. (Simple Mode) */ static void -arscp_list() +arscp_list(void) { if (!arscp_target_exist()) @@ -483,7 +483,7 @@ arscp_replace(struct list *list) /* Rename the temporary archive to the target archive. */ static void -arscp_save() +arscp_save(void) { mode_t mask; @@ -512,7 +512,7 @@ arscp_save() * invoking CREATE cmd on current archive. */ static void -arscp_clear() +arscp_clear(void) { char *new_target; @@ -549,7 +549,7 @@ arscp_end(int eval) * issued by user. */ static int -arscp_target_exist() +arscp_target_exist(void) { if (target) @@ -624,7 +624,7 @@ arscp_mlist2argv(struct list *list) /* Free space allocated for argv array and its elements. */ static void -arscp_free_argv() +arscp_free_argv(void) { int i; @@ -636,7 +636,7 @@ arscp_free_argv() /* Show a prompt if we are in interactive mode */ static void -arscp_prompt() +arscp_prompt(void) { if (interactive) { diff --git a/usr.bin/ar/ar.c b/usr.bin/ar/ar.c index 35a0380..dc4b6c4 100644 --- a/usr.bin/ar/ar.c +++ b/usr.bin/ar/ar.c @@ -349,7 +349,7 @@ only_mode(struct bsdar *bsdar, const char *opt, const char *valid_modes) } static void -bsdar_usage() +bsdar_usage(void) { (void)fprintf(stderr, "usage: ar -d [-Tjsvz] archive file ...\n"); @@ -367,7 +367,7 @@ bsdar_usage() } static void -ranlib_usage() +ranlib_usage(void) { (void)fprintf(stderr, "usage: ranlib [-t] archive ...\n"); @@ -376,14 +376,14 @@ ranlib_usage() } static void -bsdar_version() +bsdar_version(void) { (void)printf("BSD ar %s - %s\n", BSDAR_VERSION, archive_version()); exit(EX_OK); } static void -ranlib_version() +ranlib_version(void) { (void)printf("ranlib %s - %s\n", BSDAR_VERSION, archive_version()); exit(EX_OK); diff --git a/usr.bin/at/at.c b/usr.bin/at/at.c index 71d8e60..fbba7bd 100644 --- a/usr.bin/at/at.c +++ b/usr.bin/at/at.c @@ -179,7 +179,7 @@ static char *cwdname(void) } static long -nextjob() +nextjob(void) { long jobno; FILE *fid; diff --git a/usr.bin/banner/banner.c b/usr.bin/banner/banner.c index eb96a15..b87aa40 100644 --- a/usr.bin/banner/banner.c +++ b/usr.bin/banner/banner.c @@ -1178,7 +1178,7 @@ main(int argc, char *argv[]) } static void -usage() +usage(void) { fprintf(stderr, "usage: banner [-d] [-t] [-w width] message ...\n"); exit(1); diff --git a/usr.bin/biff/biff.c b/usr.bin/biff/biff.c index c04c8d3..70d2d85 100644 --- a/usr.bin/biff/biff.c +++ b/usr.bin/biff/biff.c @@ -110,7 +110,7 @@ main(int argc, char *argv[]) } static void -usage() +usage(void) { (void)fprintf(stderr, "usage: biff [n | y | b]\n"); exit(2); diff --git a/usr.bin/lam/lam.c b/usr.bin/lam/lam.c index 333549f..0cb681a 100644 --- a/usr.bin/lam/lam.c +++ b/usr.bin/lam/lam.c @@ -221,7 +221,7 @@ gatherline(struct openfile *ip) } static void -usage() +usage(void) { fprintf(stderr, "%s\n%s\n", "usage: lam [ -f min.max ] [ -s sepstring ] [ -t c ] file ...", diff --git a/usr.bin/login/login.c b/usr.bin/login/login.c index 2a42924..da182aa 100644 --- a/usr.bin/login/login.c +++ b/usr.bin/login/login.c @@ -737,7 +737,7 @@ auth_pam(void) * Export any environment variables PAM modules may have set */ static void -export_pam_environment() +export_pam_environment(void) { char **pam_env; char **pp; @@ -786,7 +786,7 @@ export(const char *s) } static void -usage() +usage(void) { (void)fprintf(stderr, "usage: login [-fp] [-h hostname] [username]\n"); @@ -797,7 +797,7 @@ usage() * Prompt user and read login name from stdin. */ static char * -getloginname() +getloginname(void) { char *nbuf, *p; int ch; @@ -941,7 +941,7 @@ pam_syslog(const char *msg) * Shut down PAM */ static void -pam_cleanup() +pam_cleanup(void) { if (pamh != NULL) { diff --git a/usr.bin/login/login_fbtab.c b/usr.bin/login/login_fbtab.c index f6111a1..afa320f 100644 --- a/usr.bin/login/login_fbtab.c +++ b/usr.bin/login/login_fbtab.c @@ -81,10 +81,7 @@ static void login_protect(const char *, char *, int, uid_t, gid_t); /* login_fbtab - apply protections specified in /etc/fbtab or logindevperm */ void -login_fbtab(tty, uid, gid) -char *tty; -uid_t uid; -gid_t gid; +login_fbtab(char *tty, uid_t uid, gid_t gid) { FILE *fp; char buf[BUFSIZ]; @@ -124,12 +121,7 @@ gid_t gid; /* login_protect - protect one device entry */ void -login_protect(table, pattern, mask, uid, gid) -const char *table; -char *pattern; -int mask; -uid_t uid; -gid_t gid; +login_protect(const char *table, char *pattern, int mask, uid_t uid, gid_t gid) { glob_t gl; char *path; diff --git a/usr.bin/renice/renice.c b/usr.bin/renice/renice.c index 21bb4c2..55f6537 100644 --- a/usr.bin/renice/renice.c +++ b/usr.bin/renice/renice.c @@ -177,7 +177,7 @@ getnum(const char *com, const char *str, int *val) } static void -usage() +usage(void) { fprintf(stderr, "%s\n%s\n", "usage: renice priority [[-p] pid ...] [[-g] pgrp ...] [[-u] user ...]", diff --git a/usr.bin/rpcgen/rpc_hout.c b/usr.bin/rpcgen/rpc_hout.c index 7068363..7607ef7 100644 --- a/usr.bin/rpcgen/rpc_hout.c +++ b/usr.bin/rpcgen/rpc_hout.c @@ -148,8 +148,7 @@ print_xdr_func_def(const char *name, int pointerp) static void -pconstdef(def) - definition *def; +pconstdef(definition *def) { pdefine(def->def_name, def->def.co); } @@ -205,8 +204,7 @@ pstructdef(definition *def) } static void -puniondef(def) - definition *def; +puniondef(definition *def) { case_list *l; const char *name = def->def_name; @@ -374,8 +372,7 @@ parglist(proc_list *proc, const char *addargtype) } static void -penumdef(def) - definition *def; +penumdef(definition *def) { const char *name = def->def_name; enumval_list *l; @@ -406,8 +403,7 @@ penumdef(def) } static void -ptypedef(def) - definition *def; +ptypedef(definition *def) { const char *name = def->def_name; const char *old = def->def.ty.old_type; diff --git a/usr.bin/rpcgen/rpc_main.c b/usr.bin/rpcgen/rpc_main.c index fb3813f..00d85b8 100644 --- a/usr.bin/rpcgen/rpc_main.c +++ b/usr.bin/rpcgen/rpc_main.c @@ -1203,7 +1203,7 @@ parseargs(int argc, const char *argv[], struct commandline *cmd) } static void -usage() +usage(void) { f_print(stderr, "%s\n%s\n%s\n%s\n%s\n", "usage: rpcgen infile", @@ -1218,7 +1218,7 @@ usage() } static void -options_usage() +options_usage(void) { f_print(stderr, "options:\n"); f_print(stderr, "-a\t\tgenerate all files, including samples\n"); diff --git a/usr.bin/showmount/showmount.c b/usr.bin/showmount/showmount.c index 5e67cc1..c70688c 100644 --- a/usr.bin/showmount/showmount.c +++ b/usr.bin/showmount/showmount.c @@ -110,9 +110,7 @@ int tcp_callrpc(const char *host, int prognum, int versnum, int procnum, * for detailed information on the protocol. */ int -main(argc, argv) - int argc; - char **argv; +main(int argc, char **argv) { register struct exportslist *exp; register struct grouplist *grp; @@ -213,15 +211,8 @@ main(argc, argv) * use tcp as transport method in order to handle large replies. */ int -tcp_callrpc(host, prognum, versnum, procnum, inproc, in, outproc, out) - const char *host; - int prognum; - int versnum; - int procnum; - xdrproc_t inproc; - char *in; - xdrproc_t outproc; - char *out; +tcp_callrpc(const char *host, int prognum, int versnum, int procnum, + xdrproc_t inproc, char *in, xdrproc_t outproc, char *out) { CLIENT *client; struct timeval timeout; @@ -245,9 +236,7 @@ tcp_callrpc(host, prognum, versnum, procnum, inproc, in, outproc, out) * Xdr routine for retrieving the mount dump list */ int -xdr_mntdump(xdrsp, mlp) - XDR *xdrsp; - struct mountlist **mlp; +xdr_mntdump(XDR *xdrsp, struct mountlist **mlp) { register struct mountlist *mp; register struct mountlist *tp; @@ -327,9 +316,7 @@ next: * Xdr routine to retrieve exports list */ int -xdr_exportslist(xdrsp, exp) - XDR *xdrsp; - struct exportslist **exp; +xdr_exportslist(XDR *xdrsp, struct exportslist **exp) { register struct exportslist *ep; register struct grouplist *gp; @@ -370,7 +357,7 @@ xdr_exportslist(xdrsp, exp) } static void -usage() +usage(void) { fprintf(stderr, "usage: showmount [-a | -d] [-e3] [host]\n"); exit(1); @@ -380,8 +367,7 @@ usage() * Print the binary tree in inorder so that output is sorted. */ void -print_dump(mp) - struct mountlist *mp; +print_dump(struct mountlist *mp) { if (mp == NULL) diff --git a/usr.bin/tail/misc.c b/usr.bin/tail/misc.c index 7e57504..26b162a 100644 --- a/usr.bin/tail/misc.c +++ b/usr.bin/tail/misc.c @@ -63,7 +63,7 @@ ierr(const char *fname) } void -oerr() +oerr(void) { err(1, "stdout"); } |