diff options
author | Bojan Smojver <bojan@apache.org> | 2007-05-12 12:39:44 +0000 |
---|---|---|
committer | Bojan Smojver <bojan@apache.org> | 2007-05-12 12:39:44 +0000 |
commit | 5e1f524675367576bf01f83a1562defd9a927175 (patch) | |
tree | aa4af8d2ca987cb77d040d37f26b8fb9848e41bb /file_io/unix/readwrite.c | |
parent | aa5dcf4e74202d675f1b70f4e53f4bbd7e1a5e14 (diff) | |
download | apr-5e1f524675367576bf01f83a1562defd9a927175.tar.gz |
Avoid compiler warning (rv only used if HAVE_WRITEV).
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@537402 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'file_io/unix/readwrite.c')
-rw-r--r-- | file_io/unix/readwrite.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/file_io/unix/readwrite.c b/file_io/unix/readwrite.c index 15fcd8fdf..6936519fc 100644 --- a/file_io/unix/readwrite.c +++ b/file_io/unix/readwrite.c @@ -226,8 +226,8 @@ APR_DECLARE(apr_status_t) apr_file_write(apr_file_t *thefile, const void *buf, a APR_DECLARE(apr_status_t) apr_file_writev(apr_file_t *thefile, const struct iovec *vec, apr_size_t nvec, apr_size_t *nbytes) { - apr_status_t rv; #ifdef HAVE_WRITEV + apr_status_t rv; apr_ssize_t bytes; file_lock(thefile); @@ -242,7 +242,8 @@ APR_DECLARE(apr_status_t) apr_file_writev(apr_file_t *thefile, const struct iove /* Position file pointer for writing at the offset we are * logically reading from */ - apr_int64_t offset = thefile->filePtr - thefile->dataRead + thefile->bufpos; + apr_int64_t offset = thefile->filePtr - thefile->dataRead + + thefile->bufpos; if (offset != thefile->filePtr) lseek(thefile->filedes, offset, SEEK_SET); thefile->bufpos = thefile->dataRead = 0; |