diff --git a/lib/libstand/__main.c b/lib/libstand/__main.c index 1c7e67703e0d..e38f33865c05 100644 --- a/lib/libstand/__main.c +++ b/lib/libstand/__main.c @@ -38,6 +38,6 @@ __FBSDID("$FreeBSD$"); void __main(void); void -__main() +__main(void) { } diff --git a/lib/libstand/bswap.c b/lib/libstand/bswap.c index a9bd323b7f62..212e2afe4b81 100644 --- a/lib/libstand/bswap.c +++ b/lib/libstand/bswap.c @@ -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; diff --git a/lib/libstand/cd9660.c b/lib/libstand/cd9660.c index 449480b5531e..c6bcef2ec9c2 100644 --- a/lib/libstand/cd9660.c +++ b/lib/libstand/cd9660.c @@ -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; } diff --git a/lib/libstand/environment.c b/lib/libstand/environment.c index 3505ccd98d4d..fde4cf9c3874 100644 --- a/lib/libstand/environment.c +++ b/lib/libstand/environment.c @@ -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); } diff --git a/lib/libstand/getopt.c b/lib/libstand/getopt.c index bb57fcd49e75..cfe405a85d63 100644 --- a/lib/libstand/getopt.c +++ b/lib/libstand/getopt.c @@ -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 */ diff --git a/lib/libstand/tftp.c b/lib/libstand/tftp.c index 23594bbd67b1..4a2ca69dda7a 100644 --- a/lib/libstand/tftp.c +++ b/lib/libstand/tftp.c @@ -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;