Date: Sun, 13 Dec 1998 21:29:30 -0800 (PST) From: Matthew Dillon <dillon@apollo.backplane.com> To: freebsd-current@FreeBSD.ORG Subject: Totally illegal declaration/check in i386/i386/busdma_machdep.c Message-ID: <199812140529.VAA26641@apollo.backplane.com>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199812140529.VAA26641>