Subject: kern/6783: wt driver needs pointer-arith fix
To: None <gnats-bugs@gnats.netbsd.org>
From: None <bgrayson@ece.utexas.edu>
List: netbsd-bugs
Date: 01/10/1999 14:11:25
>Number: 6783
>Category: kern
>Synopsis: wt driver needs pointer-arith fix
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: kern-bug-people (Kernel Bug People)
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sun Jan 10 12:20:01 1999
>Last-Modified:
>Originator: Brian Grayson
>Organization:
Parallel and Distributed Systems
Electrical and Computer Engineering
The University of Texas at Austin
>Release: Jan 9, 1999
>Environment:
>Description:
wt.c, the Wangtek tape-drive driver, does not compile
with -Wpointer-arith.
>How-To-Repeat:
>Fix:
This patch allows compiles to complete. I'm not sure if
the code I wrote is the way things should be done, so
feel free to modify it.
--- wt.c.dist Sun Jan 10 13:58:10 1999
+++ wt.c Sun Jan 10 14:00:23 1999
@@ -732,7 +732,7 @@
if (sc->dmacount < sc->dmatotal) {
/* Continue I/O. */
- sc->dmavaddr += sc->bsize;
+ sc->dmavaddr = (void *)((char *)sc->dmavaddr + sc->bsize);
wtdma(sc);
WTDBPRINT(("continue i/o, %d\n", sc->dmacount));
return 1;
>Audit-Trail:
>Unformatted: