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.
This commit is contained in:
Ed Schouten 2010-01-02 10:09:20 +00:00
parent daaf575910
commit ef636796f6
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=201382
13 changed files with 35 additions and 61 deletions

View file

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

View file

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

View file

@ -179,7 +179,7 @@ static char *cwdname(void)
}
static long
nextjob()
nextjob(void)
{
long jobno;
FILE *fid;

View file

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

View file

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

View file

@ -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 ...",

View file

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

View file

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

View file

@ -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 ...]",

View file

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

View file

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

View file

@ -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 @@ xdr_mntdump(xdrsp, mlp)
* 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)

View file

@ -63,7 +63,7 @@ ierr(const char *fname)
}
void
oerr()
oerr(void)
{
err(1, "stdout");
}