From a18f415374d3616c14c88ea543a66f8f76116fa6 Mon Sep 17 00:00:00 2001 From: Olaf Barthel Date: Sun, 3 Apr 2005 10:53:24 +0000 Subject: [PATCH] - Small tweaks to fix GCC 68k compiler warnings. git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14913 87f5fb63-7c3d-0410-a384-fd976d0f7a62 --- library/complex_headers.h | 6 +++--- library/uio_readv.c | 11 ++--------- library/uio_writev.c | 9 +-------- 3 files changed, 6 insertions(+), 20 deletions(-) diff --git a/library/complex_headers.h b/library/complex_headers.h index f4aa255..cc4e0f8 100755 --- a/library/complex_headers.h +++ b/library/complex_headers.h @@ -1,5 +1,5 @@ /* - * $Id: complex_headers.h,v 1.1 2005-04-03 10:22:47 obarthel Exp $ + * $Id: complex_headers.h,v 1.2 2005-04-03 10:53:24 obarthel Exp $ * * :ts=4 * @@ -42,7 +42,7 @@ /****************************************************************************/ -#if defined(FLOATING_POINT_SUPPORT) && defined(__GNUC__) +#if defined(FLOATING_POINT_SUPPORT) && defined(__GNUC__) && ((__STDC_VERSION__ + 0) >= 199901L) /****************************************************************************/ @@ -61,7 +61,7 @@ /****************************************************************************/ -#endif /* FLOATING_POINT_SUPPORT && __GNUC__ */ +#endif /* FLOATING_POINT_SUPPORT && __GNUC__ && __STDC_VERSION__ */ /****************************************************************************/ diff --git a/library/uio_readv.c b/library/uio_readv.c index 9905e66..66bf960 100644 --- a/library/uio_readv.c +++ b/library/uio_readv.c @@ -1,5 +1,5 @@ /* - * $Id: uio_readv.c,v 1.1 2005-04-03 10:22:47 obarthel Exp $ + * $Id: uio_readv.c,v 1.2 2005-04-03 10:53:24 obarthel Exp $ * * :ts=4 * @@ -83,13 +83,6 @@ readv(int file_descriptor,const struct iovec *iov,int vec_count) /* Check for overflow. An expensive test, but better to do it here than in the read loop. */ for(i = 0, total_num_bytes_read = 0 ; i < vec_count ; i++) { - /* Paraoia... */ - if(iov[i].iov_len < 0) - { - __set_errno(EINVAL); - goto out; - } - total_num_bytes_read += iov[i].iov_len; if(total_num_bytes_read < 0) /* Rollover. */ { @@ -135,7 +128,7 @@ readv(int file_descriptor,const struct iovec *iov,int vec_count) total_num_bytes_read += num_bytes_read; part_num_bytes_read += num_bytes_read; - if(part_num_bytes_read < iov[i].iov_len) + if((size_t)part_num_bytes_read < iov[i].iov_len) { /* Avoid busy-waiting for more data here? */ continue; diff --git a/library/uio_writev.c b/library/uio_writev.c index aec81dd..35376cd 100644 --- a/library/uio_writev.c +++ b/library/uio_writev.c @@ -1,5 +1,5 @@ /* - * $Id: uio_writev.c,v 1.1 2005-04-03 10:22:47 obarthel Exp $ + * $Id: uio_writev.c,v 1.2 2005-04-03 10:53:24 obarthel Exp $ * * :ts=4 * @@ -83,13 +83,6 @@ writev(int file_descriptor,const struct iovec *iov,int vec_count) here than in the write loop. */ for(i = 0, total_num_bytes_written = 0 ; i < vec_count ; i++) { - if(iov[i].iov_len < 0) - { - /* Paraoia... */ - __set_errno(EINVAL); - goto out; - } - total_num_bytes_written += iov[i].iov_len; if(total_num_bytes_written < 0) /* Rollover. */ {