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/.
This commit is contained in:
parent
dc29acd1a9
commit
2c201a9afe
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=200150
@ -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);
|
||||
|
@ -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;
|
||||
/*
|
||||
|
@ -40,7 +40,7 @@ __FBSDID("$FreeBSD$");
|
||||
* Backwards compatible pause.
|
||||
*/
|
||||
int
|
||||
__pause()
|
||||
__pause(void)
|
||||
{
|
||||
return sigpause(sigblock(0L));
|
||||
}
|
||||
|
@ -40,8 +40,7 @@ __weak_reference(__raise, raise);
|
||||
__weak_reference(__raise, _raise);
|
||||
|
||||
int
|
||||
__raise(s)
|
||||
int s;
|
||||
__raise(int s)
|
||||
{
|
||||
return(kill(getpid(), s));
|
||||
}
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
||||
|
@ -132,7 +132,7 @@ monstartup(lowpc, highpc)
|
||||
}
|
||||
|
||||
void
|
||||
_mcleanup()
|
||||
_mcleanup(void)
|
||||
{
|
||||
int fd;
|
||||
int fromindex;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -39,7 +39,7 @@ extern int errno;
|
||||
__weak_reference(__error_unthreaded, __error);
|
||||
|
||||
int *
|
||||
__error_unthreaded()
|
||||
__error_unthreaded(void)
|
||||
{
|
||||
return(&errno);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user