| Fix gcc(1) warning "pointer of type 'void *' used in arithmetic". |
| |
| diff -ru --exclude-from freebsd-src-diff-exclude-names /var/tmp/freebsd-10.3-src/usr/src/sys/cddl/compat/opensolaris/kern/opensolaris_uio.c freebsd-10.3/usr/src/sys/cddl/compat/opensolaris/kern/opensolaris_uio.c |
| --- /var/tmp/freebsd-10.3-src/usr/src/sys/cddl/compat/opensolaris/kern/opensolaris_uio.c 2016-03-25 09:09:27.000000000 +0800 |
| +++ freebsd-10.3/usr/src/sys/cddl/compat/opensolaris/kern/opensolaris_uio.c 2018-01-14 00:05:33.900254376 +0800 |
| @@ -103,7 +103,8 @@ |
| uiop->uio_iovcnt--; |
| continue; |
| } |
| - iovp->iov_base += niovb; |
| + //iovp->iov_base += niovb; |
| + iovp->iov_base = (char *)iovp->iov_base + niovb; |
| uiop->uio_loffset += niovb; |
| iovp->iov_len -= niovb; |
| uiop->uio_resid -= niovb; |
| diff -ru --exclude-from freebsd-src-diff-exclude-names /var/tmp/freebsd-10.3-src/usr/src/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c freebsd-10.3/usr/src/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c |
| --- /var/tmp/freebsd-10.3-src/usr/src/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c 2016-03-25 09:09:27.000000000 +0800 |
| +++ freebsd-10.3/usr/src/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c 2018-01-14 00:06:44.913249033 +0800 |
| @@ -1807,7 +1807,7 @@ |
| while (done < len) { |
| ssize_t resid; |
| |
| - ra->err = restore_bytes(ra, buf + done, |
| + ra->err = restore_bytes(ra, (char *)buf + done, |
| len - done, ra->voff, &resid); |
| |
| if (resid == len - done) { |
| diff -ru --exclude-from freebsd-src-diff-exclude-names /var/tmp/freebsd-10.3-src/usr/src/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c freebsd-10.3/usr/src/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c |
| --- /var/tmp/freebsd-10.3-src/usr/src/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c 2016-03-25 09:09:27.000000000 +0800 |
| +++ freebsd-10.3/usr/src/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c 2018-01-14 23:16:11.409504373 +0800 |
| @@ -2741,7 +2741,8 @@ |
| *ncookies -= ncooks; |
| |
| if (uio->uio_segflg == UIO_SYSSPACE && uio->uio_iovcnt == 1) { |
| - iovp->iov_base += outcount; |
| + //iovp->iov_base += outcount; |
| + iovp->iov_base = (char *)iovp->iov_base + outcount; |
| iovp->iov_len -= outcount; |
| uio->uio_resid -= outcount; |
| } else if (error = uiomove(outbuf, (long)outcount, UIO_READ, uio)) { |