diff options
author | Ed Schouten <ed@FreeBSD.org> | 2009-12-05 19:31:38 +0000 |
---|---|---|
committer | Ed Schouten <ed@FreeBSD.org> | 2009-12-05 19:31:38 +0000 |
commit | 2c201a9afe37d2cec72faa4f00dc640c7b4130b3 (patch) | |
tree | 7888f1fc2bd55cbcf966048d3b4db70a78bdb2b3 /lib/libc | |
parent | dc29acd1a93f3664d8a9138088d812443d77ee76 (diff) | |
download | src-2c201a9afe37d2cec72faa4f00dc640c7b4130b3.tar.gz src-2c201a9afe37d2cec72faa4f00dc640c7b4130b3.zip |
Fix many "function declaration isn't a prototype" warnings in libc.
I've only fixed code that seems to be written by `us'. There are still
many warnings like this present in resolv/, rpc/, stdtime/ and yp/.
Notes
Notes:
svn path=/head/; revision=200150
Diffstat (limited to 'lib/libc')
-rw-r--r-- | lib/libc/gen/getttyent.c | 26 | ||||
-rw-r--r-- | lib/libc/gen/nlist.c | 3 | ||||
-rw-r--r-- | lib/libc/gen/pause.c | 2 | ||||
-rw-r--r-- | lib/libc/gen/raise.c | 3 | ||||
-rw-r--r-- | lib/libc/gen/sleep.c | 3 | ||||
-rw-r--r-- | lib/libc/gen/timezone.c | 10 | ||||
-rw-r--r-- | lib/libc/gen/usleep.c | 3 | ||||
-rw-r--r-- | lib/libc/gmon/gmon.c | 2 | ||||
-rw-r--r-- | lib/libc/stdio/findfp.c | 2 | ||||
-rw-r--r-- | lib/libc/stdio/funopen.c | 10 | ||||
-rw-r--r-- | lib/libc/stdlib/system.c | 3 | ||||
-rw-r--r-- | lib/libc/sys/__error.c | 2 |
12 files changed, 27 insertions, 42 deletions
diff --git a/lib/libc/gen/getttyent.c b/lib/libc/gen/getttyent.c index 9152626213e8..99d9821edb9d 100644 --- a/lib/libc/gen/getttyent.c +++ b/lib/libc/gen/getttyent.c @@ -55,8 +55,7 @@ static char *skip(char *); static char *value(char *); struct ttyent * -getttynam(tty) - const char *tty; +getttynam(const char *tty) { struct ttyent *t; @@ -71,7 +70,7 @@ getttynam(tty) } struct ttyent * -getttyent() +getttyent(void) { static struct ttyent tty; static char devpts_name[] = "pts/4294967295"; @@ -178,8 +177,7 @@ getttyent() * the next field. */ static char * -skip(p) - char *p; +skip(char *p) { char *t; int c, q; @@ -212,15 +210,14 @@ skip(p) } static char * -value(p) - char *p; +value(char *p) { return ((p = index(p, '=')) ? ++p : NULL); } int -setttyent() +setttyent(void) { DIR *devpts_dir; @@ -254,7 +251,7 @@ setttyent() } int -endttyent() +endttyent(void) { int rval; @@ -272,9 +269,7 @@ endttyent() } static int -isttystat(tty, flag) - const char *tty; - int flag; +isttystat(const char *tty, int flag) { struct ttyent *t; @@ -283,15 +278,14 @@ isttystat(tty, flag) int -isdialuptty(tty) - const char *tty; +isdialuptty(const char *tty) { return isttystat(tty, TTY_DIALUP); } -int isnettty(tty) - const char *tty; +int +isnettty(const char *tty) { return isttystat(tty, TTY_NETWORK); diff --git a/lib/libc/gen/nlist.c b/lib/libc/gen/nlist.c index 690e0b0a7c0c..1361af3366c9 100644 --- a/lib/libc/gen/nlist.c +++ b/lib/libc/gen/nlist.c @@ -209,8 +209,7 @@ static void elf_sym_to_nlist(struct nlist *, Elf_Sym *, Elf_Shdr *, int); * as such its use should be restricted. */ int -__elf_is_okay__(ehdr) - Elf_Ehdr *ehdr; +__elf_is_okay__(Elf_Ehdr *ehdr) { int retval = 0; /* diff --git a/lib/libc/gen/pause.c b/lib/libc/gen/pause.c index 86d3643435d3..00bf8339a7c8 100644 --- a/lib/libc/gen/pause.c +++ b/lib/libc/gen/pause.c @@ -40,7 +40,7 @@ __FBSDID("$FreeBSD$"); * Backwards compatible pause. */ int -__pause() +__pause(void) { return sigpause(sigblock(0L)); } diff --git a/lib/libc/gen/raise.c b/lib/libc/gen/raise.c index 12bd31fc7f13..b3d0aaed3ed2 100644 --- a/lib/libc/gen/raise.c +++ b/lib/libc/gen/raise.c @@ -40,8 +40,7 @@ __weak_reference(__raise, raise); __weak_reference(__raise, _raise); int -__raise(s) - int s; +__raise(int s) { return(kill(getpid(), s)); } diff --git a/lib/libc/gen/sleep.c b/lib/libc/gen/sleep.c index cdf5828404a1..b807c2d1d53e 100644 --- a/lib/libc/gen/sleep.c +++ b/lib/libc/gen/sleep.c @@ -41,8 +41,7 @@ __FBSDID("$FreeBSD$"); #include "un-namespace.h" unsigned int -__sleep(seconds) - unsigned int seconds; +__sleep(unsigned int seconds) { struct timespec time_to_sleep; struct timespec time_remaining; diff --git a/lib/libc/gen/timezone.c b/lib/libc/gen/timezone.c index c59ae6b60877..5f0fa667ea4d 100644 --- a/lib/libc/gen/timezone.c +++ b/lib/libc/gen/timezone.c @@ -40,7 +40,7 @@ __FBSDID("$FreeBSD$"); #include <string.h> #define TZ_MAX_CHARS 255 -char *_tztab(); +char *_tztab(int, int); /* * timezone -- @@ -53,9 +53,7 @@ char *_tztab(); static char czone[TZ_MAX_CHARS]; /* space for zone name */ char * -timezone(zone, dst) - int zone, - dst; +timezone(int zone, int dst) { char *beg, *end; @@ -106,9 +104,7 @@ static struct zone { * STANDARD LIBRARY. */ char * -_tztab(zone,dst) - int zone; - int dst; +_tztab(int zone, int dst) { struct zone *zp; char sign; diff --git a/lib/libc/gen/usleep.c b/lib/libc/gen/usleep.c index 0454665b280d..7d6559be22a3 100644 --- a/lib/libc/gen/usleep.c +++ b/lib/libc/gen/usleep.c @@ -39,8 +39,7 @@ __FBSDID("$FreeBSD$"); #include "un-namespace.h" int -__usleep(useconds) - useconds_t useconds; +__usleep(useconds_t useconds) { struct timespec time_to_sleep; diff --git a/lib/libc/gmon/gmon.c b/lib/libc/gmon/gmon.c index dd85eec48c19..fe769e88bdc2 100644 --- a/lib/libc/gmon/gmon.c +++ b/lib/libc/gmon/gmon.c @@ -132,7 +132,7 @@ monstartup(lowpc, highpc) } void -_mcleanup() +_mcleanup(void) { int fd; int fromindex; diff --git a/lib/libc/stdio/findfp.c b/lib/libc/stdio/findfp.c index 586e15c4f8bb..5bc4af73a35a 100644 --- a/lib/libc/stdio/findfp.c +++ b/lib/libc/stdio/findfp.c @@ -168,7 +168,7 @@ __warn_references(f_prealloc, "warning: this program uses f_prealloc(), which is not recommended."); void -f_prealloc() +f_prealloc(void) { struct glue *g; int n; diff --git a/lib/libc/stdio/funopen.c b/lib/libc/stdio/funopen.c index 9535340cb262..573589f14d53 100644 --- a/lib/libc/stdio/funopen.c +++ b/lib/libc/stdio/funopen.c @@ -42,11 +42,11 @@ __FBSDID("$FreeBSD$"); #include "local.h" FILE * -funopen(cookie, readfn, writefn, seekfn, closefn) - const void *cookie; - int (*readfn)(), (*writefn)(); - fpos_t (*seekfn)(void *cookie, fpos_t off, int whence); - int (*closefn)(); +funopen(const void *cookie, + int (*readfn)(void *, char *, int), + int (*writefn)(void *, const char *, int), + fpos_t (*seekfn)(void *, fpos_t, int), + int (*closefn)(void *)) { FILE *fp; int flags; diff --git a/lib/libc/stdlib/system.c b/lib/libc/stdlib/system.c index 08de63009198..4f47edffe196 100644 --- a/lib/libc/stdlib/system.c +++ b/lib/libc/stdlib/system.c @@ -46,8 +46,7 @@ __FBSDID("$FreeBSD$"); #include "libc_private.h" int -__system(command) - const char *command; +__system(const char *command) { pid_t pid, savedpid; int pstat; diff --git a/lib/libc/sys/__error.c b/lib/libc/sys/__error.c index d7b5529f999b..c3f59f8bf828 100644 --- a/lib/libc/sys/__error.c +++ b/lib/libc/sys/__error.c @@ -39,7 +39,7 @@ extern int errno; __weak_reference(__error_unthreaded, __error); int * -__error_unthreaded() +__error_unthreaded(void) { return(&errno); } |