From owner-cvs-all Tue Mar 5 22:33:40 2002 Delivered-To: cvs-all@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id E378237B405; Tue, 5 Mar 2002 22:33:33 -0800 (PST) Received: (from bde@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id g266XXE73257; Tue, 5 Mar 2002 22:33:33 -0800 (PST) (envelope-from bde) Message-Id: <200203060633.g266XXE73257@freefall.freebsd.org> From: Bruce Evans Date: Tue, 5 Mar 2002 22:33:33 -0800 (PST) To: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/sys/dev/ata ata-raid.c X-FreeBSD-CVS-Branch: HEAD Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG bde 2002/03/05 22:33:33 PST Modified files: sys/dev/ata ata-raid.c Log: Fixed a printf format error again. Rev.127 was clobbered in rev.1.128 by removing parentheses. The main bug is in gcc: on machines with 64-bit longs and 64-bit long longs, (unsigned long long)rdp->total_sectors / ((1024L * 1024L) / DEV_BSIZE)) has type plain unsigned long instead of the correctly promoted type unsigned long long, so it can not be printfed using %llu format. Even 1ULL / 1L is mispromoted. Anyway, casting the correct operand automatically avoids the problem. We do not want to to pessimize the division; we just want to convert to a common maximal type for printing. Revision Changes Path 1.31 +1 -1 src/sys/dev/ata/ata-raid.c To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message