summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorrodrigc <rodrigc@FreeBSD.org>2011-05-03 04:44:50 +0000
committerrodrigc <rodrigc@FreeBSD.org>2011-05-03 04:44:50 +0000
commita857ffe8345f7868b2fb1f9f4b0606558ecba6ca (patch)
treedd1a97c9deeabee88f1a6bad49670fb4b20d470c /lib
parent2bce8b194c9921e7d4b53aacc97157a3861c35b5 (diff)
downloadFreeBSD-src-a857ffe8345f7868b2fb1f9f4b0606558ecba6ca.zip
FreeBSD-src-a857ffe8345f7868b2fb1f9f4b0606558ecba6ca.tar.gz
Switch to ANSI function prototypes in a few places.
Get rid of some unused parameter warnings.
Diffstat (limited to 'lib')
-rw-r--r--lib/libstand/__main.c2
-rw-r--r--lib/libstand/bswap.c9
-rw-r--r--lib/libstand/cd9660.c2
-rw-r--r--lib/libstand/environment.c5
-rw-r--r--lib/libstand/getopt.c5
-rw-r--r--lib/libstand/tftp.c42
6 files changed, 22 insertions, 43 deletions
diff --git a/lib/libstand/__main.c b/lib/libstand/__main.c
index 1c7e677..e38f338 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 a9bd323..212e2af 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 449480b..c6bcef2 100644
--- a/lib/libstand/cd9660.c
+++ b/lib/libstand/cd9660.c
@@ -545,7 +545,7 @@ again:
}
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 3505ccd..fde4cf9 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 bb57fcd..cfe405a 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 23594bb..4a2ca69 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;
OpenPOWER on IntegriCloud