summaryrefslogtreecommitdiffstats
path: root/usr.sbin
diff options
context:
space:
mode:
authored <ed@FreeBSD.org>2009-12-29 22:53:27 +0000
committered <ed@FreeBSD.org>2009-12-29 22:53:27 +0000
commitb9ca89bfc495774b5fe49e23a272c721c840f68b (patch)
tree2e35e76a520e919173f604f9ba0f30358443ed4a /usr.sbin
parent86ca9a5a9bdaa4a662de58157f311ce58029b75a (diff)
downloadFreeBSD-src-b9ca89bfc495774b5fe49e23a272c721c840f68b.zip
FreeBSD-src-b9ca89bfc495774b5fe49e23a272c721c840f68b.tar.gz
ANSIfy almost all applications that use WARNS=6.
I was considering committing all these patches one by one, but as discussed with brooks@, there is no need to do this. If we ever need/want to merge these changes back, it is still possible to do this per application.
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/config/lang.l2
-rw-r--r--usr.sbin/cpucontrol/cpucontrol.c2
-rw-r--r--usr.sbin/eeprom/eeprom.c2
-rw-r--r--usr.sbin/fifolog/lib/getdate.y2
-rw-r--r--usr.sbin/lastlogin/lastlogin.c6
-rw-r--r--usr.sbin/nfsd/nfsd.c6
-rw-r--r--usr.sbin/pmcannotate/pmcannotate.c4
-rw-r--r--usr.sbin/powerd/powerd.c2
-rw-r--r--usr.sbin/sa/main.c2
-rw-r--r--usr.sbin/sa/pdb.c8
-rw-r--r--usr.sbin/sa/usrdb.c8
-rw-r--r--usr.sbin/watchdogd/watchdogd.c4
12 files changed, 23 insertions, 25 deletions
diff --git a/usr.sbin/config/lang.l b/usr.sbin/config/lang.l
index 075f21f..c7845cb 100644
--- a/usr.sbin/config/lang.l
+++ b/usr.sbin/config/lang.l
@@ -285,7 +285,7 @@ include(const char *fname, int ateof)
* Terminate the most recent inclusion.
*/
static int
-endinclude()
+endinclude(void)
{
struct incl *in;
int ateof;
diff --git a/usr.sbin/cpucontrol/cpucontrol.c b/usr.sbin/cpucontrol/cpucontrol.c
index b0ef9a3..7193080 100644
--- a/usr.sbin/cpucontrol/cpucontrol.c
+++ b/usr.sbin/cpucontrol/cpucontrol.c
@@ -102,7 +102,7 @@ static int do_update(const char *dev);
static void datadir_add(const char *path);
static void __dead2
-usage()
+usage(void)
{
const char *name;
diff --git a/usr.sbin/eeprom/eeprom.c b/usr.sbin/eeprom/eeprom.c
index ecd9267..6401858 100644
--- a/usr.sbin/eeprom/eeprom.c
+++ b/usr.sbin/eeprom/eeprom.c
@@ -146,7 +146,7 @@ action(char *line)
}
static void
-dump_config()
+dump_config(void)
{
ofwo_dump();
diff --git a/usr.sbin/fifolog/lib/getdate.y b/usr.sbin/fifolog/lib/getdate.y
index 93b5b6b..8e63e81 100644
--- a/usr.sbin/fifolog/lib/getdate.y
+++ b/usr.sbin/fifolog/lib/getdate.y
@@ -762,7 +762,7 @@ LookupWord(char *buff)
static int
-yylex()
+yylex(void)
{
char c;
char *p;
diff --git a/usr.sbin/lastlogin/lastlogin.c b/usr.sbin/lastlogin/lastlogin.c
index ef9049f..d0a9b4d 100644
--- a/usr.sbin/lastlogin/lastlogin.c
+++ b/usr.sbin/lastlogin/lastlogin.c
@@ -49,9 +49,7 @@ static void output(struct ulog_utmpx *);
static void usage(void);
int
-main(argc, argv)
- int argc;
- char *argv[];
+main(int argc, char *argv[])
{
int ch, i;
struct ulog_utmpx *u;
@@ -102,7 +100,7 @@ output(struct ulog_utmpx *u)
}
static void
-usage()
+usage(void)
{
fprintf(stderr, "usage: lastlogin [user ...]\n");
exit(1);
diff --git a/usr.sbin/nfsd/nfsd.c b/usr.sbin/nfsd/nfsd.c
index a822eb3..d86309f 100644
--- a/usr.sbin/nfsd/nfsd.c
+++ b/usr.sbin/nfsd/nfsd.c
@@ -842,7 +842,7 @@ setbindhost(struct addrinfo **ai, const char *bindhost, struct addrinfo hints)
}
void
-usage()
+usage(void)
{
(void)fprintf(stderr, "usage: nfsd %s\n", USAGE);
exit(1);
@@ -868,7 +868,7 @@ reapchild(__unused int signo)
}
void
-unregistration()
+unregistration(void)
{
if ((!rpcb_unset(NFS_PROGRAM, 2, NULL)) ||
(!rpcb_unset(NFS_PROGRAM, 3, NULL)))
@@ -876,7 +876,7 @@ unregistration()
}
void
-killchildren()
+killchildren(void)
{
int i;
diff --git a/usr.sbin/pmcannotate/pmcannotate.c b/usr.sbin/pmcannotate/pmcannotate.c
index 1a5dec2..1f39f25 100644
--- a/usr.sbin/pmcannotate/pmcannotate.c
+++ b/usr.sbin/pmcannotate/pmcannotate.c
@@ -325,7 +325,7 @@ fqueue_compact(float th)
* Flush the first-level aggregates queue.
*/
static void
-fqueue_deleteall()
+fqueue_deleteall(void)
{
struct aggent *agg;
@@ -472,7 +472,7 @@ fqueue_insertgen(void)
* Flush the raw entries general queue.
*/
static void
-general_deleteall()
+general_deleteall(void)
{
struct entry *obj;
diff --git a/usr.sbin/powerd/powerd.c b/usr.sbin/powerd/powerd.c
index e1b2a55..59ac1ca 100644
--- a/usr.sbin/powerd/powerd.c
+++ b/usr.sbin/powerd/powerd.c
@@ -259,7 +259,7 @@ get_freq_id(int freq, int *freqs, int numfreqs)
* to APM. If nothing succeeds, we'll just run in default mode.
*/
static void
-acline_init()
+acline_init(void)
{
acline_mib_len = 4;
diff --git a/usr.sbin/sa/main.c b/usr.sbin/sa/main.c
index 7be13e5..64736ac 100644
--- a/usr.sbin/sa/main.c
+++ b/usr.sbin/sa/main.c
@@ -300,7 +300,7 @@ main(int argc, char **argv)
}
static void
-usage()
+usage(void)
{
(void)fprintf(stderr,
"usage: sa [-abcdDfijkKlmnqrstu] [-P file] [-U file] [-v cutoff] [file ...]\n");
diff --git a/usr.sbin/sa/pdb.c b/usr.sbin/sa/pdb.c
index 38beb55..e5e35f5 100644
--- a/usr.sbin/sa/pdb.c
+++ b/usr.sbin/sa/pdb.c
@@ -94,14 +94,14 @@ v1_to_v2(DBT *key __unused, DBT *data)
/* Copy pdb_file to in-memory pacct_db. */
int
-pacct_init()
+pacct_init(void)
{
return (db_copy_in(&pacct_db, pdb_file, "process accounting",
NULL, v1_to_v2));
}
void
-pacct_destroy()
+pacct_destroy(void)
{
db_destroy(pacct_db, "process accounting");
}
@@ -150,14 +150,14 @@ pacct_add(const struct cmdinfo *ci)
/* Copy in-memory pacct_db to pdb_file. */
int
-pacct_update()
+pacct_update(void)
{
return (db_copy_out(pacct_db, pdb_file, "process accounting",
NULL));
}
void
-pacct_print()
+pacct_print(void)
{
BTREEINFO bti;
DBT key, data, ndata;
diff --git a/usr.sbin/sa/usrdb.c b/usr.sbin/sa/usrdb.c
index 07a5033..50778ef 100644
--- a/usr.sbin/sa/usrdb.c
+++ b/usr.sbin/sa/usrdb.c
@@ -97,7 +97,7 @@ v1_to_v2(DBT *key, DBT *data)
/* Copy usrdb_file to in-memory usracct_db. */
int
-usracct_init()
+usracct_init(void)
{
BTREEINFO bti;
@@ -109,7 +109,7 @@ usracct_init()
}
void
-usracct_destroy()
+usracct_destroy(void)
{
db_destroy(usracct_db, "user accounting");
}
@@ -166,7 +166,7 @@ usracct_add(const struct cmdinfo *ci)
/* Copy in-memory usracct_db to usrdb_file. */
int
-usracct_update()
+usracct_update(void)
{
BTREEINFO bti;
@@ -178,7 +178,7 @@ usracct_update()
}
void
-usracct_print()
+usracct_print(void)
{
DBT key, data;
struct userinfo uistore, *ui = &uistore;
diff --git a/usr.sbin/watchdogd/watchdogd.c b/usr.sbin/watchdogd/watchdogd.c
index ec010cb..073affd71 100644
--- a/usr.sbin/watchdogd/watchdogd.c
+++ b/usr.sbin/watchdogd/watchdogd.c
@@ -149,7 +149,7 @@ sighandler(int signum)
* Open the watchdog device.
*/
static int
-watchdog_init()
+watchdog_init(void)
{
fd = open("/dev/" _PATH_WATCHDOG, O_RDWR);
@@ -220,7 +220,7 @@ watchdog_onoff(int onoff)
* Tell user how to use the program.
*/
static void
-usage()
+usage(void)
{
if (is_daemon)
fprintf(stderr, "usage: watchdogd [-d] [-e cmd] [-I file] [-s sleep] [-t timeout]\n");
OpenPOWER on IntegriCloud