From owner-freebsd-current@FreeBSD.ORG Thu May 5 16:21:21 2005 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A81F316A4CE; Thu, 5 May 2005 16:21:21 +0000 (GMT) Received: from mailout2.pacific.net.au (mailout2.pacific.net.au [61.8.0.85]) by mx1.FreeBSD.org (Postfix) with ESMTP id 117F843D6D; Thu, 5 May 2005 16:21:21 +0000 (GMT) (envelope-from bde@zeta.org.au) Received: from mailproxy1.pacific.net.au (mailproxy1.pacific.net.au [61.8.0.86])j45GLKkG029013; Fri, 6 May 2005 02:21:20 +1000 Received: from epsplex.bde.org (katana.zip.com.au [61.8.7.246]) j45GLHx7019395; Fri, 6 May 2005 02:21:18 +1000 Date: Fri, 6 May 2005 02:21:18 +1000 (EST) From: Bruce Evans X-X-Sender: bde@epsplex.bde.org To: Bill Paul In-Reply-To: <20050505155445.42D4E16A4CF@hub.freebsd.org> Message-ID: <20050506021433.W4828@epsplex.bde.org> References: <20050505155445.42D4E16A4CF@hub.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Mailman-Approved-At: Fri, 06 May 2005 12:14:30 +0000 cc: amd64@freebsd.org cc: current@freebsd.org cc: tinderbox@freebsd.org Subject: Re: [current tinderbox] failure on amd64/amd64 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 May 2005 16:21:21 -0000 On Thu, 5 May 2005, Bill Paul wrote: >> On Thu, 5 May 2005, Xin LI wrote: >> >>> On Thu, May 05, 2005 at 04:44:28AM -0400, FreeBSD Tinderbox wrote: >>>> /tinderbox/CURRENT/amd64/amd64/src/sys/modules/ndis/../../compat/ndis/subr_ndis.c: In function `NdisMFreeSharedMemory': >>>> /tinderbox/CURRENT/amd64/amd64/src/sys/modules/ndis/../../compat/ndis/subr_ndis.c:1710: warning: long long unsigned int format, uint64_t arg (arg 3) >>> >>> Maybe we should make use of the PRIx64 macro? (see patch attached) >> >> No. PRI* is a bug in C99; it should never be used. Just cast the arg to >> a suitable larger type with a known format (uintmax_t here). (C99 is >> missing support for better ways; either %I as in sfio (?) or %DWIM where >> the compiler rewrites the string to match the arg would be better.) > > I think what you really meant to say was: > > "Use %jx instead of %qx." > > Am I right? No, the arg must match the format. %jx matches uintmax_t, but the arg has type uint64_t. uint64_t just happens to be the same as uintmax_t on all supported machines, so using %jx without casting the arg to match gives a latent bug. Bruce