Date: Mon, 14 Dec 1998 06:55:52 +0100 (CET) From: List User <listuser@netspace.net.au> To: freebsd-current@FreeBSD.org Message-ID: <199812140555.GAA09281@doorway.home.lan>
next in thread | raw e-mail | index | archive | help
Newsgroups: freebsd.current
Path: root
From: Matthew Dillon <dillon@apollo.backplane.com>
Subject: Totally illegal declaration/check in i386/i386/busdma_machdep.c
Received: (from dillon@localhost)
by apollo.backplane.com (8.9.1/8.9.1) id VAA26641;
Sun, 13 Dec 1998 21:29:30 -0800 (PST)
(envelope-from dillon)
To: freebsd-current
Sender: owner-freebsd-current@FreeBSD.ORG
Organization: Private News Host
Precedence: bulk
Message-ID: <199812140529.VAA26641@apollo.backplane.com>
Delivered-To: vmailer-current@freebsd.org
X-Uidl: ee3c7bdc33b6650e037137b89ee4214f
X-Loop: FreeBSD.ORG
Date: Mon, 14 Dec 1998 05:29:30 GMT
GCC warning expected? I'm sorry, but this is *illegal*. Totally
illegal. nextpaddr can be legally destroyed on each loop by the
compiler. I know what the author was trying to do, but he's wrong.
I'm fixing this.
(from i386/i386/busdma_machdep.c)
do {
bus_size_t size;
vm_offset_t nextpaddr; /* GCC warning expected */
paddr = pmap_kextract(vaddr);
size = PAGE_SIZE - (paddr & PAGE_MASK);
if (size > buflen)
size = buflen;
...
} else if (paddr == nextpaddr) {
sg->ds_len += size;
...
nextpaddr = paddr + size;
buflen -= size;
} while (buflen > 0);
Matthew Dillon Engineering, HiWay Technologies, Inc. & BEST Internet
Communications & God knows what else.
<dillon@backplane.com> (Please include original email in any response)
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199812140555.GAA09281>
