summaryrefslogtreecommitdiff
path: root/file_io/unix/readwrite.c
diff options
context:
space:
mode:
authorBojan Smojver <bojan@apache.org>2007-05-12 12:39:44 +0000
committerBojan Smojver <bojan@apache.org>2007-05-12 12:39:44 +0000
commit5e1f524675367576bf01f83a1562defd9a927175 (patch)
treeaa4af8d2ca987cb77d040d37f26b8fb9848e41bb /file_io/unix/readwrite.c
parentaa5dcf4e74202d675f1b70f4e53f4bbd7e1a5e14 (diff)
downloadapr-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.c5
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;