| Fix gcc(1) warning "pointer of type 'void *' used in arithmetic". |
| |
| diff -ru --exclude-from freebsd-src-diff-exclude-names /var/archive3/public/freebsd-releng-10.4-src/sys/cddl/compat/opensolaris/kern/opensolaris_uio.c freebsd-10.4/sys/cddl/compat/opensolaris/kern/opensolaris_uio.c |
| --- /var/archive3/public/freebsd-releng-10.4-src/sys/cddl/compat/opensolaris/kern/opensolaris_uio.c 2017-09-29 08:19:56.000000000 +0800 |
| +++ freebsd-10.4/sys/cddl/compat/opensolaris/kern/opensolaris_uio.c 2019-08-18 13:26:47.049542995 +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/archive3/public/freebsd-releng-10.4-src/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c freebsd-10.4/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c |
| --- /var/archive3/public/freebsd-releng-10.4-src/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c 2017-09-29 08:19:56.000000000 +0800 |
| +++ freebsd-10.4/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c 2019-08-18 13:29:42.623242221 +0800 |
| @@ -7029,7 +7029,7 @@ |
| |
| bcopy(hdr->b_l1hdr.b_pdata, to_write, size); |
| if (asize != size) |
| - bzero(to_write + size, asize - size); |
| + bzero((char *)to_write + size, asize - size); |
| l2arc_free_data_on_write(to_write, asize, type); |
| } |
| wzio = zio_write_phys(pio, dev->l2ad_vdev, |
| diff -ru --exclude-from freebsd-src-diff-exclude-names /var/archive3/public/freebsd-releng-10.4-src/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c freebsd-10.4/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c |
| --- /var/archive3/public/freebsd-releng-10.4-src/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c 2017-09-29 08:19:56.000000000 +0800 |
| +++ freebsd-10.4/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c 2019-08-18 13:26:47.077253377 +0800 |
| @@ -1859,7 +1859,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/archive3/public/freebsd-releng-10.4-src/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c freebsd-10.4/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c |
| --- /var/archive3/public/freebsd-releng-10.4-src/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c 2017-09-29 08:19:56.000000000 +0800 |
| +++ freebsd-10.4/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c 2019-08-18 13:26:47.092244748 +0800 |
| @@ -2578,7 +2578,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)) { |