diff options
author | bde <bde@FreeBSD.org> | 1996-08-31 14:48:13 +0000 |
---|---|---|
committer | bde <bde@FreeBSD.org> | 1996-08-31 14:48:13 +0000 |
commit | 7d4c1814f6c8b48aaba422848781244a3a8e1685 (patch) | |
tree | d30aec0f7e14e7c815c7a2ac90c600b28f51abf5 /sys/i386 | |
parent | f8b5cfc537cc8181d579a4fd086b618c24806f74 (diff) | |
download | FreeBSD-src-7d4c1814f6c8b48aaba422848781244a3a8e1685.zip FreeBSD-src-7d4c1814f6c8b48aaba422848781244a3a8e1685.tar.gz |
Don't depend in the kernel on the gcc feature of doing arithmetic on
pointers of type `void *'. Warn about this in future.
Diffstat (limited to 'sys/i386')
-rw-r--r-- | sys/i386/conf/Makefile.i386 | 4 | ||||
-rw-r--r-- | sys/i386/eisa/eisaconf.c | 28 | ||||
-rw-r--r-- | sys/i386/isa/if_cx.c | 2 | ||||
-rw-r--r-- | sys/i386/isa/istallion.c | 18 | ||||
-rw-r--r-- | sys/i386/isa/wt.c | 4 |
5 files changed, 28 insertions, 28 deletions
diff --git a/sys/i386/conf/Makefile.i386 b/sys/i386/conf/Makefile.i386 index 91d0712..bf60da1 100644 --- a/sys/i386/conf/Makefile.i386 +++ b/sys/i386/conf/Makefile.i386 @@ -1,7 +1,7 @@ # Makefile.i386 -- with config changes. # Copyright 1990 W. Jolitz # from: @(#)Makefile.i386 7.1 5/10/91 -# $Id: Makefile.i386,v 1.85 1996/06/12 05:54:46 gpalmer Exp $ +# $Id: Makefile.i386,v 1.86 1996/08/21 16:31:34 ache Exp $ # # Makefile for FreeBSD # @@ -28,7 +28,7 @@ I386= ${S}/i386 CWARNFLAGS?= -W -Wreturn-type -Wcomment -Wredundant-decls -Wimplicit \ -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes \ - -Winline -Wunused + -Winline -Wunused -Wpointer-arith # # The following flags are next up for working on: # -Wall diff --git a/sys/i386/eisa/eisaconf.c b/sys/i386/eisa/eisaconf.c index 7a71910..4b0d464 100644 --- a/sys/i386/eisa/eisaconf.c +++ b/sys/i386/eisa/eisaconf.c @@ -28,7 +28,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: eisaconf.c,v 1.19 1996/04/20 21:21:49 gibbs Exp $ + * $Id: eisaconf.c,v 1.20 1996/06/12 05:02:41 gpalmer Exp $ */ #include <sys/param.h> #include <sys/systm.h> @@ -700,7 +700,7 @@ eisa_generic_externalize(struct kern_devconf *kdc, struct sysctl_req *req) void *ma_prev; /* Prev Node entries relative to target address space */ int retval; - offset = req->oldptr + req->oldidx; + offset = (char *)req->oldptr + req->oldidx; buf = malloc(kdc->kdc_datalen, M_TEMP, M_NOWAIT); if (!buf) return 0; @@ -710,13 +710,13 @@ eisa_generic_externalize(struct kern_devconf *kdc, struct sysctl_req *req) e_dev = bufp; /* Calculate initial prev nodes */ - ioa_prev = offset + ((void *)&(e_dev->ioconf.ioaddrs.lh_first) - - (void *)e_dev); - ma_prev = offset + ((void *)&(e_dev->ioconf.maddrs.lh_first) - - (void *)e_dev); + ioa_prev = (char *)offset + ((char *)&(e_dev->ioconf.ioaddrs.lh_first) + - (char *)e_dev); + ma_prev = (char *)offset + ((char *)&(e_dev->ioconf.maddrs.lh_first) + - (char *)e_dev); - offset += sizeof(*e_dev); - bufp += sizeof(*e_dev); + offset = (char *)offset + sizeof(*e_dev); + bufp = (char *)bufp + sizeof(*e_dev); if (e_dev->ioconf.ioaddrs.lh_first) { node = e_dev->ioconf.ioaddrs.lh_first; @@ -726,11 +726,11 @@ eisa_generic_externalize(struct kern_devconf *kdc, struct sysctl_req *req) bcopy(node, bufp, sizeof(resvaddr_t)); out_node = (resvaddr_t *)bufp; - bufp += sizeof(resvaddr_t); - offset += sizeof(resvaddr_t); + bufp = (char *)bufp + sizeof(resvaddr_t); + offset = (char *)offset + sizeof(resvaddr_t); out_node->links.le_prev = ioa_prev; - ioa_prev += sizeof(resvaddr_t); + ioa_prev = (char *)ioa_prev + sizeof(resvaddr_t); if (out_node->links.le_next) out_node->links.le_next = offset; @@ -744,11 +744,11 @@ eisa_generic_externalize(struct kern_devconf *kdc, struct sysctl_req *req) bcopy(node, bufp, sizeof(resvaddr_t)); out_node = (resvaddr_t *)bufp; - bufp += sizeof(resvaddr_t); - offset += sizeof(resvaddr_t); + bufp = (char *)bufp + sizeof(resvaddr_t); + offset = (char *)offset + sizeof(resvaddr_t); out_node->links.le_prev = ma_prev; - ma_prev += sizeof(resvaddr_t); + ma_prev = (char *)ma_prev + sizeof(resvaddr_t); if (out_node->links.le_next) out_node->links.le_next = offset; diff --git a/sys/i386/isa/if_cx.c b/sys/i386/isa/if_cx.c index c1114c7..0cbc959 100644 --- a/sys/i386/isa/if_cx.c +++ b/sys/i386/isa/if_cx.c @@ -176,7 +176,7 @@ static struct mbuf *makembuf (void *buf, unsigned len) bcopy (buf, mtod (p, caddr_t) + p->m_len, n); p->m_len += n; - buf += n; + buf = (char *)buf + n; len -= n; } return (m); diff --git a/sys/i386/isa/istallion.c b/sys/i386/isa/istallion.c index 88fd624..7181445 100644 --- a/sys/i386/isa/istallion.c +++ b/sys/i386/isa/istallion.c @@ -33,7 +33,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: istallion.c,v 1.3 1996/06/12 04:26:35 gpalmer Exp $ + * $Id: istallion.c,v 1.4 1996/06/18 01:22:25 bde Exp $ */ /*****************************************************************************/ @@ -2631,7 +2631,7 @@ static char *stli_ecpgetmemptr(stlibrd_t *brdp, unsigned long offset, int line) ptr = 0; val = 0; } else { - ptr = brdp->vaddr + (offset % ECP_ATPAGESIZE); + ptr = (char *) brdp->vaddr + (offset % ECP_ATPAGESIZE); val = (unsigned char) (offset / ECP_ATPAGESIZE); } outb((brdp->iobase + ECP_ATMEMPR), val); @@ -2721,7 +2721,7 @@ static char *stli_ecpeigetmemptr(stlibrd_t *brdp, unsigned long offset, int line ptr = 0; val = 0; } else { - ptr = brdp->vaddr + (offset % ECP_EIPAGESIZE); + ptr = (char *) brdp->vaddr + (offset % ECP_EIPAGESIZE); if (offset < ECP_EIPAGESIZE) val = ECP_EIENABLE; else @@ -2773,7 +2773,7 @@ static char *stli_ecpmcgetmemptr(stlibrd_t *brdp, unsigned long offset, int line ptr = 0; val = 0; } else { - ptr = brdp->vaddr + (offset % ECP_MCPAGESIZE); + ptr = (char *) brdp->vaddr + (offset % ECP_MCPAGESIZE); val = ((unsigned char) (offset / ECP_MCPAGESIZE)) | ECP_MCENABLE; } outb((brdp->iobase + ECP_MCCONFR), val); @@ -2854,7 +2854,7 @@ static char *stli_onbgetmemptr(stlibrd_t *brdp, unsigned long offset, int line) __LINE__, brdp->brdnr); ptr = 0; } else { - ptr = brdp->vaddr + (offset % ONB_ATPAGESIZE); + ptr = (char *) brdp->vaddr + (offset % ONB_ATPAGESIZE); } return(ptr); } @@ -2945,7 +2945,7 @@ static char *stli_onbegetmemptr(stlibrd_t *brdp, unsigned long offset, int line) ptr = 0; val = 0; } else { - ptr = brdp->vaddr + (offset % ONB_EIPAGESIZE); + ptr = (char *) brdp->vaddr + (offset % ONB_EIPAGESIZE); if (offset < ONB_EIPAGESIZE) val = ONB_EIENABLE; else @@ -3014,7 +3014,7 @@ static char *stli_bbygetmemptr(stlibrd_t *brdp, unsigned long offset, int line) ptr = 0; val = 0; } else { - ptr = brdp->vaddr + (offset % BBY_PAGESIZE); + ptr = (char *) brdp->vaddr + (offset % BBY_PAGESIZE); val = (unsigned char) (offset / BBY_PAGESIZE); } outb((brdp->iobase + BBY_ATCONFR), val); @@ -3074,7 +3074,7 @@ static char *stli_stalgetmemptr(stlibrd_t *brdp, unsigned long offset, int line) __LINE__, brdp->brdnr); ptr = 0; } else { - ptr = brdp->vaddr + (offset % STAL_PAGESIZE); + ptr = (char *) brdp->vaddr + (offset % STAL_PAGESIZE); } return(ptr); } @@ -3090,7 +3090,7 @@ static void stli_stalreset(stlibrd_t *brdp) printf("stli_stalreset(brdp=%x)\n", (int) brdp); #endif - vecp = (volatile unsigned long *) (brdp->vaddr + 0x30); + vecp = (volatile unsigned long *) ((char *) brdp->vaddr + 0x30); *vecp = 0xffff0000; outb(brdp->iobase, 0); for (i = 0; (i < 1000); i++) diff --git a/sys/i386/isa/wt.c b/sys/i386/isa/wt.c index 2b4c792..9c5f5af 100644 --- a/sys/i386/isa/wt.c +++ b/sys/i386/isa/wt.c @@ -20,7 +20,7 @@ * the original CMU copyright notice. * * Version 1.3, Thu Nov 11 12:09:13 MSK 1993 - * $Id: wt.c,v 1.32 1996/04/08 19:40:57 smpatel Exp $ + * $Id: wt.c,v 1.33 1996/07/23 21:51:50 phk Exp $ * */ @@ -692,7 +692,7 @@ wtintr (int u) } if (t->dmacount < t->dmatotal) { /* continue i/o */ - t->dmavaddr += t->bsize; + t->dmavaddr = (char *)t->dmavaddr + t->bsize; wtdma (t); TRACE (("continue i/o, %d\n", t->dmacount)); return; |