This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
FreeBSD port (18): readv, writev warnings
- From: Bruno Haible <bruno at clisp dot org>
- To: libc-alpha at sources dot redhat dot com
- Date: Thu, 11 Jul 2002 14:25:00 +0200 (CEST)
- Subject: FreeBSD port (18): readv, writev warnings
Hi,
The FreeBSD port uses the sysdeps/posix/readv.c, sysdeps/posix/writev.c
emulations of readv(), writev(). With the default warning settings and
gcc-3.1, I get gcc warnings
In file included from ../sysdeps/unix/bsd/bsd4.4/freebsd/readv.c:32:
../sysdeps/posix/readv.c:34: warning: function declaration isn't a prototype
In file included from ../sysdeps/unix/bsd/bsd4.4/freebsd/writev.c:32:
../sysdeps/posix/writev.c:34: warning: function declaration isn't a prototype
Here is a fix:
2002-07-06 Bruno Haible <bruno@clisp.org>
* sysdeps/posix/readv.c: Ansify function definition.
* sysdeps/posix/writev.c: Likewise.
diff -r -c3 glibc-20020627.bak/sysdeps/posix/readv.c glibc-20020627/sysdeps/posix/readv.c
--- glibc-20020627.bak/sysdeps/posix/readv.c Mon Feb 4 12:42:42 2002
+++ glibc-20020627/sysdeps/posix/readv.c Fri Jul 5 01:17:10 2002
@@ -30,10 +30,7 @@
Operates just like `read' (see <unistd.h>) except that data are
put in VECTOR instead of a contiguous buffer. */
ssize_t
-__readv (fd, vector, count)
- int fd;
- const struct iovec *vector;
- int count;
+__readv (int fd, const struct iovec *vector, int count)
{
char *buffer;
char *buffer_start;
diff -r -c3 glibc-20020627.bak/sysdeps/posix/writev.c glibc-20020627/sysdeps/posix/writev.c
--- glibc-20020627.bak/sysdeps/posix/writev.c Mon Feb 4 12:42:42 2002
+++ glibc-20020627/sysdeps/posix/writev.c Fri Jul 5 01:17:10 2002
@@ -30,10 +30,7 @@
Operates just like `write' (see <unistd.h>) except that the data
are taken from VECTOR instead of a contiguous buffer. */
ssize_t
-__writev (fd, vector, count)
- int fd;
- const struct iovec *vector;
- int count;
+__writev (int fd, const struct iovec *vector, int count)
{
char *buffer;
register char *bp;