From d2db996158d1103da0b500880f1d3f1bd0a5139e Mon Sep 17 00:00:00 2001 From: kleink Date: Thu, 7 May 1998 21:13:23 +0000 Subject: [PATCH] Fix some arithmetics lossage on typeless pointers. --- sys/arch/sparc/dev/am7930_sparc.c | 6 +++--- sys/arch/sparc/dev/amd7930.c | 6 +++--- sys/arch/sparc/sparc/machdep.c | 6 +++--- sys/arch/sparc/sparc/svr4_machdep.c | 6 +++--- sys/dev/ic/am7930.c | 6 +++--- 5 files changed, 15 insertions(+), 15 deletions(-) diff --git a/sys/arch/sparc/dev/am7930_sparc.c b/sys/arch/sparc/dev/am7930_sparc.c index 9e4dd8531824..d894593e191d 100644 --- a/sys/arch/sparc/dev/am7930_sparc.c +++ b/sys/arch/sparc/dev/am7930_sparc.c @@ -1,4 +1,4 @@ -/* $NetBSD: am7930_sparc.c,v 1.37 1998/03/30 14:23:40 pk Exp $ */ +/* $NetBSD: am7930_sparc.c,v 1.38 1998/05/07 21:13:23 kleink Exp $ */ /* * Copyright (c) 1995 Rolf Grossmann @@ -557,7 +557,7 @@ amd7930_start_output(addr, p, cc, intr, arg) sc->sc_pintr = intr; sc->sc_parg = arg; sc->sc_au.au_pdata = p; - sc->sc_au.au_pend = p + cc - 1; + sc->sc_au.au_pend = (u_char *)p + cc - 1; return(0); } @@ -589,7 +589,7 @@ amd7930_start_input(addr, p, cc, intr, arg) sc->sc_rintr = intr; sc->sc_rarg = arg; sc->sc_au.au_rdata = p; - sc->sc_au.au_rend = p + cc -1; + sc->sc_au.au_rend = (u_char *)p + cc -1; return(0); } diff --git a/sys/arch/sparc/dev/amd7930.c b/sys/arch/sparc/dev/amd7930.c index e15a6a3313ad..d62626134568 100644 --- a/sys/arch/sparc/dev/amd7930.c +++ b/sys/arch/sparc/dev/amd7930.c @@ -1,4 +1,4 @@ -/* $NetBSD: amd7930.c,v 1.37 1998/03/30 14:23:40 pk Exp $ */ +/* $NetBSD: amd7930.c,v 1.38 1998/05/07 21:13:23 kleink Exp $ */ /* * Copyright (c) 1995 Rolf Grossmann @@ -557,7 +557,7 @@ amd7930_start_output(addr, p, cc, intr, arg) sc->sc_pintr = intr; sc->sc_parg = arg; sc->sc_au.au_pdata = p; - sc->sc_au.au_pend = p + cc - 1; + sc->sc_au.au_pend = (u_char *)p + cc - 1; return(0); } @@ -589,7 +589,7 @@ amd7930_start_input(addr, p, cc, intr, arg) sc->sc_rintr = intr; sc->sc_rarg = arg; sc->sc_au.au_rdata = p; - sc->sc_au.au_rend = p + cc -1; + sc->sc_au.au_rend = (u_char *)p + cc -1; return(0); } diff --git a/sys/arch/sparc/sparc/machdep.c b/sys/arch/sparc/sparc/machdep.c index e2651859e80f..d191a28b7e5c 100644 --- a/sys/arch/sparc/sparc/machdep.c +++ b/sys/arch/sparc/sparc/machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.112 1998/04/07 19:57:37 pk Exp $ */ +/* $NetBSD: machdep.c,v 1.113 1998/05/07 21:13:24 kleink Exp $ */ /*- * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc. @@ -617,8 +617,8 @@ sendsig(catcher, sig, mask, code) */ if ((psp->ps_flags & SAS_ALTSTACK) && !oonstack && (psp->ps_sigonstack & sigmask(sig))) { - fp = (struct sigframe *)(psp->ps_sigstk.ss_sp + - psp->ps_sigstk.ss_size); + fp = (struct sigframe *)((caddr_t)psp->ps_sigstk.ss_sp + + psp->ps_sigstk.ss_size); psp->ps_sigstk.ss_flags |= SS_ONSTACK; } else fp = (struct sigframe *)oldsp; diff --git a/sys/arch/sparc/sparc/svr4_machdep.c b/sys/arch/sparc/sparc/svr4_machdep.c index 38af0692e8cd..0dea9aa09a02 100644 --- a/sys/arch/sparc/sparc/svr4_machdep.c +++ b/sys/arch/sparc/sparc/svr4_machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: svr4_machdep.c,v 1.26 1998/01/24 18:26:09 mycroft Exp $ */ +/* $NetBSD: svr4_machdep.c,v 1.27 1998/05/07 21:13:24 kleink Exp $ */ /* * Copyright (c) 1994 Christos Zoulas @@ -502,8 +502,8 @@ svr4_sendsig(catcher, sig, mask, code) */ if ((psp->ps_flags & SAS_ALTSTACK) && !oonstack && (psp->ps_sigonstack & sigmask(sig))) { - fp = (struct svr4_sigframe *)(psp->ps_sigstk.ss_sp + - psp->ps_sigstk.ss_size); + fp = (struct svr4_sigframe *)((caddr_t)psp->ps_sigstk.ss_sp + + psp->ps_sigstk.ss_size); psp->ps_sigstk.ss_flags |= SS_ONSTACK; } else { fp = (struct svr4_sigframe *)oldsp; diff --git a/sys/dev/ic/am7930.c b/sys/dev/ic/am7930.c index ae013986204a..2ea5e3f4829b 100644 --- a/sys/dev/ic/am7930.c +++ b/sys/dev/ic/am7930.c @@ -1,4 +1,4 @@ -/* $NetBSD: am7930.c,v 1.37 1998/03/30 14:23:40 pk Exp $ */ +/* $NetBSD: am7930.c,v 1.38 1998/05/07 21:13:23 kleink Exp $ */ /* * Copyright (c) 1995 Rolf Grossmann @@ -557,7 +557,7 @@ amd7930_start_output(addr, p, cc, intr, arg) sc->sc_pintr = intr; sc->sc_parg = arg; sc->sc_au.au_pdata = p; - sc->sc_au.au_pend = p + cc - 1; + sc->sc_au.au_pend = (u_char *)p + cc - 1; return(0); } @@ -589,7 +589,7 @@ amd7930_start_input(addr, p, cc, intr, arg) sc->sc_rintr = intr; sc->sc_rarg = arg; sc->sc_au.au_rdata = p; - sc->sc_au.au_rend = p + cc -1; + sc->sc_au.au_rend = (u_char *)p + cc -1; return(0); }