Source-Changes-HG archive

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

[src/trunk]: src/sys/lib/libsa Changes to compile the next68k bootblocks with



details:   https://anonhg.NetBSD.org/src/rev/5a3cb165e325
branches:  trunk
changeset: 467618:5a3cb165e325
user:      dbj <dbj%NetBSD.org@localhost>
date:      Fri Mar 26 15:41:38 1999 +0000

description:
Changes to compile the next68k bootblocks with
egcs -Wpointer-arith -Wstrict-prototypes
This closes pr 6653

diffstat:

 sys/lib/libsa/cd9660.c  |  16 ++++++++--------
 sys/lib/libsa/dev_net.c |  15 ++++++++++++---
 sys/lib/libsa/dev_net.h |   7 +++----
 sys/lib/libsa/tftp.c    |   4 ++--
 sys/lib/libsa/ustarfs.c |   4 ++--
 5 files changed, 27 insertions(+), 19 deletions(-)

diffs (143 lines):

diff -r 7f34c708143b -r 5a3cb165e325 sys/lib/libsa/cd9660.c
--- a/sys/lib/libsa/cd9660.c    Fri Mar 26 14:58:22 1999 +0000
+++ b/sys/lib/libsa/cd9660.c    Fri Mar 26 15:41:38 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cd9660.c,v 1.6 1999/02/11 09:10:44 pk Exp $    */
+/*     $NetBSD: cd9660.c,v 1.7 1999/03/26 15:41:38 dbj Exp $   */
 
 /*
  * Copyright (C) 1996 Wolfgang Solfrank.
@@ -199,22 +199,22 @@
        
        rc = ENOENT;
        while (*path) {
-               if ((void *)pp >= buf + psize)
+               if ((caddr_t)pp >= (caddr_t)buf + psize)
                        break;
                if (isonum_722(pp->parent) != parent)
                        break;
                if (!pnmatch(path, pp)) {
-                       pp = (struct ptable_ent *)((void *)pp + PTSIZE(pp));
+                       pp = (struct ptable_ent *)((caddr_t)pp + PTSIZE(pp));
                        ent++;
                        continue;
                }
                path += isonum_711(pp->namlen) + 1;
                parent = ent;
                bno = isonum_732(pp->block) + isonum_711(pp->extlen);
-               while ((void *)pp < buf + psize) {
+               while ((caddr_t)pp < (caddr_t)buf + psize) {
                        if (isonum_722(pp->parent) == parent)
                                break;
-                       pp = (struct ptable_ent *)((void *)pp + PTSIZE(pp));
+                       pp = (struct ptable_ent *)((caddr_t)pp + PTSIZE(pp));
                        ent++;
                }
        }
@@ -250,7 +250,7 @@
                if (dirmatch(path, dp))
                        break;
                psize += isonum_711(dp->length);
-               dp = (struct iso_directory_record *)((void *)dp + isonum_711(dp->length));
+               dp = (struct iso_directory_record *)((caddr_t)dp + isonum_711(dp->length));
        }
 
        if (psize >= dsize) {
@@ -326,11 +326,11 @@
                                read = off + size;
                        read -= off;
                        bcopy(buf + off, start, read);
-                       start += read;
+                       start = (caddr_t)start + read;
                        fp->off += read;
                        size -= read;
                } else {
-                       start += ISO_DEFAULT_BLOCK_SIZE;
+                       start = (caddr_t)start + ISO_DEFAULT_BLOCK_SIZE;
                        fp->off += ISO_DEFAULT_BLOCK_SIZE;
                        size -= ISO_DEFAULT_BLOCK_SIZE;
                }
diff -r 7f34c708143b -r 5a3cb165e325 sys/lib/libsa/dev_net.c
--- a/sys/lib/libsa/dev_net.c   Fri Mar 26 14:58:22 1999 +0000
+++ b/sys/lib/libsa/dev_net.c   Fri Mar 26 15:41:38 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: dev_net.c,v 1.14 1998/06/29 20:25:59 gwr Exp $ */
+/*     $NetBSD: dev_net.c,v 1.15 1999/03/26 15:41:38 dbj Exp $ */
 
 /*-
  * Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -164,13 +164,22 @@
 }
 
 int
-net_ioctl()
+net_ioctl(f, cmd, data)
+       struct open_file *f;
+       u_long cmd;
+       void *data;
 {
        return EIO;
 }
 
 int
-net_strategy()
+net_strategy(devdata, rw, blk, size, buf, rsize)
+       void *devdata;
+       int rw;
+       daddr_t blk;
+       size_t size;
+       void *buf;
+       size_t *rsize;
 {
        return EIO;
 }
diff -r 7f34c708143b -r 5a3cb165e325 sys/lib/libsa/dev_net.h
--- a/sys/lib/libsa/dev_net.h   Fri Mar 26 14:58:22 1999 +0000
+++ b/sys/lib/libsa/dev_net.h   Fri Mar 26 15:41:38 1999 +0000
@@ -1,7 +1,6 @@
-/*     $NetBSD: dev_net.h,v 1.3 1997/03/15 18:12:14 is Exp $   */
+/*     $NetBSD: dev_net.h,v 1.4 1999/03/26 15:41:38 dbj Exp $  */
 
 int    net_open __P((struct open_file *, ...));
 int    net_close __P((struct open_file *));
-int    net_ioctl();
-int    net_strategy();
-
+int    net_ioctl __P((struct open_file *, u_long, void *));
+int    net_strategy __P((void *, int , daddr_t , size_t, void *, size_t *));
diff -r 7f34c708143b -r 5a3cb165e325 sys/lib/libsa/tftp.c
--- a/sys/lib/libsa/tftp.c      Fri Mar 26 14:58:22 1999 +0000
+++ b/sys/lib/libsa/tftp.c      Fri Mar 26 15:41:38 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: tftp.c,v 1.4 1999/02/28 00:57:07 kim Exp $      */
+/*     $NetBSD: tftp.c,v 1.5 1999/03/26 15:41:38 dbj Exp $      */
 
 /*
  * Copyright (c) 1996
@@ -345,7 +345,7 @@
                        bcopy(tftpfile->lastdata.t.th_data + offinblock,
                            addr, count);
 
-                       addr += count;
+                       addr = (caddr_t)addr + count;
                        tftpfile->off += count;
                        size -= count;
 
diff -r 7f34c708143b -r 5a3cb165e325 sys/lib/libsa/ustarfs.c
--- a/sys/lib/libsa/ustarfs.c   Fri Mar 26 14:58:22 1999 +0000
+++ b/sys/lib/libsa/ustarfs.c   Fri Mar 26 15:41:38 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ustarfs.c,v 1.6 1998/12/19 19:24:32 he Exp $   */
+/*     $NetBSD: ustarfs.c,v 1.7 1999/03/26 15:41:38 dbj Exp $  */
 
 /* [Notice revision 2.2]
  * Copyright (c) 1997, 1998 Avalon Computer Systems, Inc.
@@ -468,7 +468,7 @@
                        seg = infile;
                memcpy(start, space512 + bufferoffset, seg);
                ustf->uas_fseek += seg;
-               start += seg;
+               start = (caddr_t)start + seg;
                size  -= seg;
        }
        if (resid)



Home | Main Index | Thread Index | Old Index