From owner-cvs-src@FreeBSD.ORG Sun Feb 6 21:12:23 2005 Return-Path: Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3699916A4CE; Sun, 6 Feb 2005 21:12:23 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2100843D1D; Sun, 6 Feb 2005 21:12:23 +0000 (GMT) (envelope-from imp@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id j16LCNh1049447; Sun, 6 Feb 2005 21:12:23 GMT (envelope-from imp@repoman.freebsd.org) Received: (from imp@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id j16LCNAA049446; Sun, 6 Feb 2005 21:12:23 GMT (envelope-from imp) Message-Id: <200502062112.j16LCNAA049446@repoman.freebsd.org> From: Warner Losh Date: Sun, 6 Feb 2005 21:12:23 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/sys/dev/ray if_ray.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Feb 2005 21:12:23 -0000 imp 2005-02-06 21:12:23 UTC FreeBSD src repository Modified files: sys/dev/ray if_ray.c Log: ccs is a size_t. RAY_CCS_INDEX takes ccs and does math on it, resulting in a size_t due to C's rules of arithmetic. Rather than bogusly cast the result to a uint8_t, fix the printf format specifier to have a 'z' modifier which tells the compiler that the sizes really do match. It turns out that change 1.75 was incorrect to assume that this 'really' was a 8bit quantity. It isn't. Although the hardware appears to limit things to < 256, it would be a bug that should be caught by debug printf it it were. Casting it to uint8_t would have lost this useful information. Aslo add 'z' to a nearby debug statement that's never compiled in. Revision Changes Path 1.76 +2 -2 src/sys/dev/ray/if_ray.c