diff options
author | Björn-Egil Dahlberg <[email protected]> | 2013-03-04 18:06:12 +0100 |
---|---|---|
committer | Björn-Egil Dahlberg <[email protected]> | 2013-03-04 18:06:12 +0100 |
commit | d0e0ce2aa23f036675288735a43fc6581d79c95c (patch) | |
tree | bb6420318aebf8c4611fbc39ccc299cd48c30117 /erts/emulator/drivers | |
parent | 41e849eecd06ebb1472ddfb369243f0b337e0bd7 (diff) | |
download | otp-d0e0ce2aa23f036675288735a43fc6581d79c95c.tar.gz otp-d0e0ce2aa23f036675288735a43fc6581d79c95c.tar.bz2 otp-d0e0ce2aa23f036675288735a43fc6581d79c95c.zip |
erts: Fix void * arithmetic
Diffstat (limited to 'erts/emulator/drivers')
-rw-r--r-- | erts/emulator/drivers/common/efile_drv.c | 6 | ||||
-rw-r--r-- | erts/emulator/drivers/unix/unix_efile.c | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/erts/emulator/drivers/common/efile_drv.c b/erts/emulator/drivers/common/efile_drv.c index b202556f1e..a2ef0db83c 100644 --- a/erts/emulator/drivers/common/efile_drv.c +++ b/erts/emulator/drivers/common/efile_drv.c @@ -1346,7 +1346,7 @@ static void invoke_preadv(void *data) = efile_pread(&d->errInfo, (int) d->fd, c->offsets[c->cnt] + c->size, - ev->iov[1 + c->cnt].iov_base + c->size, + ((char *)ev->iov[1 + c->cnt].iov_base) + c->size, read_size, &bytes_read))) { bytes_read_so_far += bytes_read; @@ -1641,7 +1641,7 @@ static void invoke_pwritev(void *data) { - c->free_size; } d->result_ok = efile_pwrite(&d->errInfo, (int) d->fd, - iov[iovcnt].iov_base + p, + (char *)(iov[iovcnt].iov_base) + p, write_size, c->specs[c->cnt].offset); if (! d->result_ok) { @@ -3813,7 +3813,7 @@ file_outputv(ErlDrvData e, ErlIOVec *ev) { res_ev->iov[0].iov_base = res_ev->binv[0]->orig_bytes; /* Fill in the number of buffers in the header */ put_int32(0, res_ev->iov[0].iov_base); - put_int32(n, res_ev->iov[0].iov_base+4); + put_int32(n, (char *)(res_ev->iov[0].iov_base) + 4); /**/ res_ev->size = res_ev->iov[0].iov_len; if (n == 0) { diff --git a/erts/emulator/drivers/unix/unix_efile.c b/erts/emulator/drivers/unix/unix_efile.c index 558651fff9..2bd5177be1 100644 --- a/erts/emulator/drivers/unix/unix_efile.c +++ b/erts/emulator/drivers/unix/unix_efile.c @@ -629,7 +629,7 @@ efile_writev(Efile_error* errInfo, /* Where to return error codes */ if (w < iov[cnt].iov_len) { /* Adjust the buffer for next write */ iov[cnt].iov_len -= w; - iov[cnt].iov_base += w; + iov[cnt].iov_base = ((char *)iov[cnt].iov_base) + w; w = 0; break; } else { |