Switch to ANSI function prototypes in a few places.
Get rid of some unused parameter warnings.
This commit is contained in:
parent
e94b542e02
commit
74ff69fe44
@ -38,6 +38,6 @@ __FBSDID("$FreeBSD$");
|
||||
void __main(void);
|
||||
|
||||
void
|
||||
__main()
|
||||
__main(void)
|
||||
{
|
||||
}
|
||||
|
@ -16,9 +16,11 @@ static char *rcsid = "$NetBSD: bswap64.c,v 1.1 1997/10/09 15:42:33 bouyer Exp $"
|
||||
#undef bswap32
|
||||
#undef bswap64
|
||||
|
||||
u_int32_t bswap32(u_int32_t x);
|
||||
u_int64_t bswap64(u_int64_t x);
|
||||
|
||||
u_int32_t
|
||||
bswap32(x)
|
||||
u_int32_t x;
|
||||
bswap32(u_int32_t x)
|
||||
{
|
||||
return ((x << 24) & 0xff000000 ) |
|
||||
((x << 8) & 0x00ff0000 ) |
|
||||
@ -27,8 +29,7 @@ bswap32(x)
|
||||
}
|
||||
|
||||
u_int64_t
|
||||
bswap64(x)
|
||||
u_int64_t x;
|
||||
bswap64(u_int64_t x)
|
||||
{
|
||||
u_int32_t *p = (u_int32_t*)&x;
|
||||
u_int32_t t;
|
||||
|
@ -545,7 +545,7 @@ cd9660_readdir(struct open_file *f, struct dirent *d)
|
||||
}
|
||||
|
||||
static int
|
||||
cd9660_write(struct open_file *f, void *start, size_t size, size_t *resid)
|
||||
cd9660_write(struct open_file *f __unused, void *start __unused, size_t size __unused, size_t *resid __unused)
|
||||
{
|
||||
return EROFS;
|
||||
}
|
||||
|
@ -207,13 +207,14 @@ env_discard(struct env_var *ev)
|
||||
}
|
||||
|
||||
int
|
||||
env_noset(struct env_var *ev, int flags, const void *value)
|
||||
env_noset(struct env_var *ev __unused, int flags __unused,
|
||||
const void *value __unused)
|
||||
{
|
||||
return(EPERM);
|
||||
}
|
||||
|
||||
int
|
||||
env_nounset(struct env_var *ev)
|
||||
env_nounset(struct env_var *ev __unused)
|
||||
{
|
||||
return(EPERM);
|
||||
}
|
||||
|
@ -52,10 +52,7 @@ char *optarg; /* argument associated with option */
|
||||
* Parse argc/argv argument vector.
|
||||
*/
|
||||
int
|
||||
getopt(nargc, nargv, ostr)
|
||||
int nargc;
|
||||
char * const *nargv;
|
||||
const char *ostr;
|
||||
getopt(int nargc, char * const *nargv, const char *ostr)
|
||||
{
|
||||
static char *place = EMSG; /* option letter processing */
|
||||
char *oli; /* option letter list index */
|
||||
|
@ -110,11 +110,7 @@ static const int tftperrors[8] = {
|
||||
};
|
||||
|
||||
static ssize_t
|
||||
recvtftp(d, pkt, len, tleft)
|
||||
struct iodesc *d;
|
||||
void *pkt;
|
||||
ssize_t len;
|
||||
time_t tleft;
|
||||
recvtftp(struct iodesc *d, void *pkt, ssize_t len, time_t tleft)
|
||||
{
|
||||
struct tftphdr *t;
|
||||
|
||||
@ -168,8 +164,7 @@ recvtftp(d, pkt, len, tleft)
|
||||
|
||||
/* send request, expect first block (or error) */
|
||||
static int
|
||||
tftp_makereq(h)
|
||||
struct tftp_handle *h;
|
||||
tftp_makereq(struct tftp_handle *h)
|
||||
{
|
||||
struct {
|
||||
u_char header[HEADER_SIZE];
|
||||
@ -212,8 +207,7 @@ tftp_makereq(h)
|
||||
|
||||
/* ack block, expect next */
|
||||
static int
|
||||
tftp_getnextblock(h)
|
||||
struct tftp_handle *h;
|
||||
tftp_getnextblock(struct tftp_handle *h)
|
||||
{
|
||||
struct {
|
||||
u_char header[HEADER_SIZE];
|
||||
@ -246,9 +240,7 @@ tftp_getnextblock(h)
|
||||
}
|
||||
|
||||
static int
|
||||
tftp_open(path, f)
|
||||
const char *path;
|
||||
struct open_file *f;
|
||||
tftp_open(const char *path, struct open_file *f)
|
||||
{
|
||||
struct tftp_handle *tftpfile;
|
||||
struct iodesc *io;
|
||||
@ -287,11 +279,8 @@ tftp_open(path, f)
|
||||
}
|
||||
|
||||
static int
|
||||
tftp_read(f, addr, size, resid)
|
||||
struct open_file *f;
|
||||
void *addr;
|
||||
size_t size;
|
||||
size_t *resid; /* out */
|
||||
tftp_read(struct open_file *f, void *addr, size_t size,
|
||||
size_t *resid /* out */)
|
||||
{
|
||||
struct tftp_handle *tftpfile;
|
||||
static int tc = 0;
|
||||
@ -361,8 +350,7 @@ tftp_read(f, addr, size, resid)
|
||||
}
|
||||
|
||||
static int
|
||||
tftp_close(f)
|
||||
struct open_file *f;
|
||||
tftp_close(struct open_file *f)
|
||||
{
|
||||
struct tftp_handle *tftpfile;
|
||||
tftpfile = (struct tftp_handle *) f->f_fsdata;
|
||||
@ -377,19 +365,14 @@ tftp_close(f)
|
||||
}
|
||||
|
||||
static int
|
||||
tftp_write(f, start, size, resid)
|
||||
struct open_file *f;
|
||||
void *start;
|
||||
size_t size;
|
||||
size_t *resid; /* out */
|
||||
tftp_write(struct open_file *f __unused, void *start __unused, size_t size __unused,
|
||||
size_t *resid /* out */ __unused)
|
||||
{
|
||||
return (EROFS);
|
||||
}
|
||||
|
||||
static int
|
||||
tftp_stat(f, sb)
|
||||
struct open_file *f;
|
||||
struct stat *sb;
|
||||
tftp_stat(struct open_file *f, struct stat *sb)
|
||||
{
|
||||
struct tftp_handle *tftpfile;
|
||||
tftpfile = (struct tftp_handle *) f->f_fsdata;
|
||||
@ -403,10 +386,7 @@ tftp_stat(f, sb)
|
||||
}
|
||||
|
||||
static off_t
|
||||
tftp_seek(f, offset, where)
|
||||
struct open_file *f;
|
||||
off_t offset;
|
||||
int where;
|
||||
tftp_seek(struct open_file *f, off_t offset, int where)
|
||||
{
|
||||
struct tftp_handle *tftpfile;
|
||||
tftpfile = (struct tftp_handle *) f->f_fsdata;
|
||||
|
Loading…
Reference in New Issue
Block a user