From owner-freebsd-current Tue Dec 15 07:14:03 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id HAA07994 for freebsd-current-outgoing; Tue, 15 Dec 1998 07:14:03 -0800 (PST) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from mailhost.mil.ameritech.net (mpdr0.milwaukee.wi.ameritech.net [206.141.239.126]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id HAA07965 for ; Tue, 15 Dec 1998 07:13:59 -0800 (PST) (envelope-from randyd@ameritech.net) Received: from ameritech.net ([209.18.22.49]) by mailhost.mil.ameritech.net (InterMail v03.02.07 118 124) with ESMTP id <19981215150651.ZOM2410@ameritech.net>; Tue, 15 Dec 1998 09:06:51 -0600 Message-ID: <3674AF65.7B6BCFAB@ameritech.net> Date: Mon, 14 Dec 1998 00:25:41 -0600 From: "Randall D. DuCharme" Organization: Astrolab Developement X-Mailer: Mozilla 4.5 [en] (X11; I; SunOS 5.7 i86pc) X-Accept-Language: en MIME-Version: 1.0 To: Matthew Dillon CC: freebsd-current@FreeBSD.ORG Subject: Re: Totally illegal declaration/check in i386/i386/busdma_machdep.c References: <199812140529.VAA26641@apollo.backplane.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Matthew Dillon wrote: > > 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 -- Randall D DuCharme Systems Engineer Novell, Microsoft, and UNIX Networking Support Computer Specialists Free Your Machine.... FreeBSD 414-253-9998 414-253-9919 (fax) The Power To Serve! To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message