From owner-freebsd-current Sun Dec 13 22:54:03 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id WAA06061 for freebsd-current-outgoing; Sun, 13 Dec 1998 22:27:47 -0800 (PST) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from mailb.telia.com (mailb.telia.com [194.22.194.6]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id WAA05678 for ; Sun, 13 Dec 1998 22:26:49 -0800 (PST) (envelope-from listuser@netspace.net.au) Received: from d1o1.telia.com (root@d1o1.telia.com [195.67.240.241]) by mailb.telia.com (8.8.8/8.8.8) with ESMTP id HAA08369 for ; Mon, 14 Dec 1998 07:26:38 +0100 (CET) Received: from doorway.home.lan (t6o1p59.telia.com [195.67.241.119]) by d1o1.telia.com (8.8.8/8.8.5) with ESMTP id HAA19178 for ; Mon, 14 Dec 1998 07:26:37 +0100 (CET) Received: (from listuser@localhost) by doorway.home.lan (8.8.8/8.8.7) id GAA09281 for freebsd-current@FreeBSD.org; Mon, 14 Dec 1998 06:55:52 +0100 (CET) (envelope-from listuser) Date: Mon, 14 Dec 1998 06:55:52 +0100 (CET) From: List User Message-Id: <199812140555.GAA09281@doorway.home.lan> To: freebsd-current@FreeBSD.org Sender: owner-freebsd-current@FreeBSD.org Precedence: bulk X-Loop: FreeBSD.ORG Newsgroups: freebsd.current Path: root From: Matthew Dillon 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. (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