Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/cesfic fix void * math, turn on -Wpointer-arith.



details:   https://anonhg.NetBSD.org/src/rev/1536896e9fac
branches:  trunk
changeset: 537762:1536896e9fac
user:      chs <chs%NetBSD.org@localhost>
date:      Sat Oct 05 16:25:34 2002 +0000

description:
fix void * math, turn on -Wpointer-arith.

diffstat:

 sys/arch/cesfic/cesfic/mem.c         |  4 ++--
 sys/arch/cesfic/conf/Makefile.cesfic |  4 ++--
 sys/arch/cesfic/dev/zs.c             |  6 +++---
 3 files changed, 7 insertions(+), 7 deletions(-)

diffs (56 lines):

diff -r 8c323e2b1771 -r 1536896e9fac sys/arch/cesfic/cesfic/mem.c
--- a/sys/arch/cesfic/cesfic/mem.c      Sat Oct 05 16:13:31 2002 +0000
+++ b/sys/arch/cesfic/cesfic/mem.c      Sat Oct 05 16:25:34 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: mem.c,v 1.3 2002/09/06 13:18:43 gehenna Exp $  */
+/*     $NetBSD: mem.c,v 1.4 2002/10/05 16:25:34 chs Exp $      */
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -176,7 +176,7 @@
                }
                if (error)
                        break;
-               iov->iov_base += c;
+               iov->iov_base = (caddr_t)iov->iov_base + c;
                iov->iov_len -= c;
                uio->uio_offset += c;
                uio->uio_resid -= c;
diff -r 8c323e2b1771 -r 1536896e9fac sys/arch/cesfic/conf/Makefile.cesfic
--- a/sys/arch/cesfic/conf/Makefile.cesfic      Sat Oct 05 16:13:31 2002 +0000
+++ b/sys/arch/cesfic/conf/Makefile.cesfic      Sat Oct 05 16:25:34 2002 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile.cesfic,v 1.8 2002/06/04 21:39:09 thorpej Exp $
+#      $NetBSD: Makefile.cesfic,v 1.9 2002/10/05 16:25:34 chs Exp $
 
 # Makefile for NetBSD
 #
@@ -31,7 +31,7 @@
 ##
 ## (2) compile settings
 ##
-WEAK_POINTERS= yes
+CPPFLAGS+=     -Dcesfic
 CWARNFLAGS+=   -Wno-format
 CFLAGS+=       -msoft-float
 .if defined(HAVE_GCC3)
diff -r 8c323e2b1771 -r 1536896e9fac sys/arch/cesfic/dev/zs.c
--- a/sys/arch/cesfic/dev/zs.c  Sat Oct 05 16:13:31 2002 +0000
+++ b/sys/arch/cesfic/dev/zs.c  Sat Oct 05 16:25:34 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: zs.c,v 1.3 2002/09/24 07:06:08 ad Exp $        */
+/*     $NetBSD: zs.c,v 1.4 2002/10/05 16:25:34 chs Exp $       */
 
 /*-
  * Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -487,8 +487,8 @@
        zs_hwflags[0][0] = ZS_HWFLAG_CONSOLE;
 
        /* Setup temporary chanstate. */
-       cs->cs_reg_csr  = base+7;
-       cs->cs_reg_data = base+15;
+       cs->cs_reg_csr  = (char *)base + 7;
+       cs->cs_reg_data = (char *)base + 15;
 
        /* Initialize the pending registers. */
        bcopy(zs_init_reg, cs->cs_preg, 16);



Home | Main Index | Thread Index | Old Index