From owner-svn-src-head@FreeBSD.ORG Sat Dec 5 19:31:38 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A465F1065670; Sat, 5 Dec 2009 19:31:38 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9252C8FC17; Sat, 5 Dec 2009 19:31:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nB5JVcs4097457; Sat, 5 Dec 2009 19:31:38 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nB5JVcHl097444; Sat, 5 Dec 2009 19:31:38 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <200912051931.nB5JVcHl097444@svn.freebsd.org> From: Ed Schouten Date: Sat, 5 Dec 2009 19:31:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r200150 - in head/lib/libc: gen gmon stdio stdlib sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Dec 2009 19:31:38 -0000 Author: ed Date: Sat Dec 5 19:31:38 2009 New Revision: 200150 URL: http://svn.freebsd.org/changeset/base/200150 Log: 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/. Modified: head/lib/libc/gen/getttyent.c head/lib/libc/gen/nlist.c head/lib/libc/gen/pause.c head/lib/libc/gen/raise.c head/lib/libc/gen/sleep.c head/lib/libc/gen/timezone.c head/lib/libc/gen/usleep.c head/lib/libc/gmon/gmon.c head/lib/libc/stdio/findfp.c head/lib/libc/stdio/funopen.c head/lib/libc/stdlib/system.c head/lib/libc/sys/__error.c Modified: head/lib/libc/gen/getttyent.c ============================================================================== --- head/lib/libc/gen/getttyent.c Sat Dec 5 19:25:29 2009 (r200149) +++ head/lib/libc/gen/getttyent.c Sat Dec 5 19:31:38 2009 (r200150) @@ -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); Modified: head/lib/libc/gen/nlist.c ============================================================================== --- head/lib/libc/gen/nlist.c Sat Dec 5 19:25:29 2009 (r200149) +++ head/lib/libc/gen/nlist.c Sat Dec 5 19:31:38 2009 (r200150) @@ -209,8 +209,7 @@ static void elf_sym_to_nlist(struct nlis * as such its use should be restricted. */ int -__elf_is_okay__(ehdr) - Elf_Ehdr *ehdr; +__elf_is_okay__(Elf_Ehdr *ehdr) { int retval = 0; /* Modified: head/lib/libc/gen/pause.c ============================================================================== --- head/lib/libc/gen/pause.c Sat Dec 5 19:25:29 2009 (r200149) +++ head/lib/libc/gen/pause.c Sat Dec 5 19:31:38 2009 (r200150) @@ -40,7 +40,7 @@ __FBSDID("$FreeBSD$"); * Backwards compatible pause. */ int -__pause() +__pause(void) { return sigpause(sigblock(0L)); } Modified: head/lib/libc/gen/raise.c ============================================================================== --- head/lib/libc/gen/raise.c Sat Dec 5 19:25:29 2009 (r200149) +++ head/lib/libc/gen/raise.c Sat Dec 5 19:31:38 2009 (r200150) @@ -40,8 +40,7 @@ __weak_reference(__raise, raise); __weak_reference(__raise, _raise); int -__raise(s) - int s; +__raise(int s) { return(kill(getpid(), s)); } Modified: head/lib/libc/gen/sleep.c ============================================================================== --- head/lib/libc/gen/sleep.c Sat Dec 5 19:25:29 2009 (r200149) +++ head/lib/libc/gen/sleep.c Sat Dec 5 19:31:38 2009 (r200150) @@ -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; Modified: head/lib/libc/gen/timezone.c ============================================================================== --- head/lib/libc/gen/timezone.c Sat Dec 5 19:25:29 2009 (r200149) +++ head/lib/libc/gen/timezone.c Sat Dec 5 19:31:38 2009 (r200150) @@ -40,7 +40,7 @@ __FBSDID("$FreeBSD$"); #include #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; Modified: head/lib/libc/gen/usleep.c ============================================================================== --- head/lib/libc/gen/usleep.c Sat Dec 5 19:25:29 2009 (r200149) +++ head/lib/libc/gen/usleep.c Sat Dec 5 19:31:38 2009 (r200150) @@ -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; Modified: head/lib/libc/gmon/gmon.c ============================================================================== --- head/lib/libc/gmon/gmon.c Sat Dec 5 19:25:29 2009 (r200149) +++ head/lib/libc/gmon/gmon.c Sat Dec 5 19:31:38 2009 (r200150) @@ -132,7 +132,7 @@ monstartup(lowpc, highpc) } void -_mcleanup() +_mcleanup(void) { int fd; int fromindex; Modified: head/lib/libc/stdio/findfp.c ============================================================================== --- head/lib/libc/stdio/findfp.c Sat Dec 5 19:25:29 2009 (r200149) +++ head/lib/libc/stdio/findfp.c Sat Dec 5 19:31:38 2009 (r200150) @@ -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; Modified: head/lib/libc/stdio/funopen.c ============================================================================== --- head/lib/libc/stdio/funopen.c Sat Dec 5 19:25:29 2009 (r200149) +++ head/lib/libc/stdio/funopen.c Sat Dec 5 19:31:38 2009 (r200150) @@ -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; Modified: head/lib/libc/stdlib/system.c ============================================================================== --- head/lib/libc/stdlib/system.c Sat Dec 5 19:25:29 2009 (r200149) +++ head/lib/libc/stdlib/system.c Sat Dec 5 19:31:38 2009 (r200150) @@ -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; Modified: head/lib/libc/sys/__error.c ============================================================================== --- head/lib/libc/sys/__error.c Sat Dec 5 19:25:29 2009 (r200149) +++ head/lib/libc/sys/__error.c Sat Dec 5 19:31:38 2009 (r200150) @@ -39,7 +39,7 @@ extern int errno; __weak_reference(__error_unthreaded, __error); int * -__error_unthreaded() +__error_unthreaded(void) { return(&errno); }