From owner-freebsd-current Sun Dec 13 21:29:37 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id VAA28956 for freebsd-current-outgoing; Sun, 13 Dec 1998 21:29:37 -0800 (PST) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from apollo.backplane.com (apollo.backplane.com [209.157.86.2]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id VAA28951 for ; Sun, 13 Dec 1998 21:29:34 -0800 (PST) (envelope-from dillon@apollo.backplane.com) 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) Date: Sun, 13 Dec 1998 21:29:30 -0800 (PST) From: Matthew Dillon Message-Id: <199812140529.VAA26641@apollo.backplane.com> To: freebsd-current@FreeBSD.ORG Subject: Totally illegal declaration/check in i386/i386/busdma_machdep.c Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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