diff options
author | stefanf <stefanf@FreeBSD.org> | 2004-10-03 15:58:20 +0000 |
---|---|---|
committer | stefanf <stefanf@FreeBSD.org> | 2004-10-03 15:58:20 +0000 |
commit | 06aa92a1b805a79ccf1e4d918298ab3c7b078a39 (patch) | |
tree | 2f283732548b11bf0e682b76a522ad0fe86c753e | |
parent | f3f8ad79f64bcb2e92d92cfd6a77a532d50b8ca9 (diff) | |
download | FreeBSD-src-06aa92a1b805a79ccf1e4d918298ab3c7b078a39.zip FreeBSD-src-06aa92a1b805a79ccf1e4d918298ab3c7b078a39.tar.gz |
Don't add integers to void pointers.
-rw-r--r-- | lib/libstand/dosfs.c | 2 | ||||
-rw-r--r-- | lib/libstand/ext2fs.c | 2 | ||||
-rw-r--r-- | lib/libstand/read.c | 2 | ||||
-rw-r--r-- | lib/libstand/sbrk.c | 4 | ||||
-rw-r--r-- | lib/libstand/splitfs.c | 2 | ||||
-rw-r--r-- | lib/libstand/tftp.c | 2 |
6 files changed, 7 insertions, 7 deletions
diff --git a/lib/libstand/dosfs.c b/lib/libstand/dosfs.c index 41547c8..161d330 100644 --- a/lib/libstand/dosfs.c +++ b/lib/libstand/dosfs.c @@ -277,7 +277,7 @@ dos_read(struct open_file *fd, void *buf, size_t nbyte, size_t *resid) f->offset += n; f->c = c; off = 0; - buf += n; + buf = (char *)buf + n; cnt -= n; } out: diff --git a/lib/libstand/ext2fs.c b/lib/libstand/ext2fs.c index 153f163..1bd78e2 100644 --- a/lib/libstand/ext2fs.c +++ b/lib/libstand/ext2fs.c @@ -834,7 +834,7 @@ ext2fs_read(struct open_file *f, void *addr, size_t size, size_t *resid) bcopy(buf, addr, csize); fp->f_seekp += csize; - addr += csize; + addr = (char *)addr + csize; size -= csize; } if (resid) diff --git a/lib/libstand/read.c b/lib/libstand/read.c index 07401c1..09e24e1 100644 --- a/lib/libstand/read.c +++ b/lib/libstand/read.c @@ -108,7 +108,7 @@ read(int fd, void *dest, size_t bcount) resid -= ccount; if (resid == 0) return(bcount); - dest += ccount; + dest = (char *)dest + ccount; } /* will filling the readahead buffer again not help? */ diff --git a/lib/libstand/sbrk.c b/lib/libstand/sbrk.c index b6245f9..93d94e4 100644 --- a/lib/libstand/sbrk.c +++ b/lib/libstand/sbrk.c @@ -42,7 +42,7 @@ setheap(void *base, void *top) { /* Align start address to 16 bytes for the malloc code. Sigh. */ heapbase = (void *)(((uintptr_t)base + 15) & ~15); - maxheap = top - heapbase; + maxheap = (char *)top - (char *)heapbase; } char * @@ -51,7 +51,7 @@ sbrk(int incr) char *ret; if ((heapsize + incr) <= maxheap) { - ret = heapbase + heapsize; + ret = (char *)heapbase + heapsize; bzero(ret, incr); heapsize += incr; return(ret); diff --git a/lib/libstand/splitfs.c b/lib/libstand/splitfs.c index 35593ad..9adcdec 100644 --- a/lib/libstand/splitfs.c +++ b/lib/libstand/splitfs.c @@ -207,7 +207,7 @@ splitfs_read(struct open_file *f, void *buf, size_t size, size_t *resid) sf->tot_pos += nread; sf->file_pos += nread; totread += nread; - buf += nread; + buf = (char *)buf + nread; if (totread < size) { /* EOF */ if (sf->curfile == (sf->filesc - 1)) /* Last slice */ diff --git a/lib/libstand/tftp.c b/lib/libstand/tftp.c index 3a6630c..0cbfa52 100644 --- a/lib/libstand/tftp.c +++ b/lib/libstand/tftp.c @@ -340,7 +340,7 @@ tftp_read(f, addr, size, resid) bcopy(tftpfile->lastdata.t.th_data + offinblock, addr, count); - addr += count; + addr = (char *)addr + count; tftpfile->off += count; size -= count; |