From owner-svn-src-all@FreeBSD.ORG Wed Jul 17 08:03:23 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 955B9D4F; Wed, 17 Jul 2013 08:03:23 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail105.syd.optusnet.com.au (mail105.syd.optusnet.com.au [211.29.132.249]) by mx1.freebsd.org (Postfix) with ESMTP id 351D3B92; Wed, 17 Jul 2013 08:03:22 +0000 (UTC) Received: from c122-106-156-23.carlnfd1.nsw.optusnet.com.au (c122-106-156-23.carlnfd1.nsw.optusnet.com.au [122.106.156.23]) by mail105.syd.optusnet.com.au (Postfix) with ESMTPS id 637861040FCD; Wed, 17 Jul 2013 18:03:11 +1000 (EST) Date: Wed, 17 Jul 2013 18:03:10 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Kevin Lo Subject: Re: svn commit: r253402 - head/tools/regression/aio/aiop In-Reply-To: <201307170054.r6H0sLEc065384@svn.freebsd.org> Message-ID: <20130717174435.C1577@besplex.bde.org> References: <201307170054.r6H0sLEc065384@svn.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=DstvpgP+ c=1 sm=1 tr=0 a=ebeQFi2P/qHVC0Yw9JDJ4g==:117 a=PO7r1zJSAAAA:8 a=l-S_Jr1bGj4A:10 a=kj9zAlcOel0A:10 a=JzwRw_2MAAAA:8 a=5h7fK-8y68oA:10 a=Rnw1DLDLdCwogYVR2fsA:9 a=CjuIK1q_8ugA:10 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Jul 2013 08:03:23 -0000 On Wed, 17 Jul 2013, Kevin Lo wrote: > Log: > Use PRId64 instead of %gd to print an int64_t. This is a different printf format error, and a style bug. Printf format errors: commit log: %gd doesn't exist. You mean %qd old: file_size has type off_t, but was printed using %qd. off_t is only accidentally the same as quad_t new: file_size has type off_t, but is printed using %PRId64. off_t is only accidentally the same as int64_t. Style bug: the PRI* mistake should never be used. Fix for printf format errors: don't assume anything about off_t except its specification that it is a signed integer type. Convert it to intmax_t for printing. Fix for style bug: use %jd to print the intmax_t. The PRI* mistake is especially large for intmax_t and uintmax_t. It lets you spell %jd as %PRIdMAX. PRI* is redundant for intmax_t and uintmax_t because there is a format letter ('j') for these types. No other PRI* has this redundancy bug. For example, there is no PRI* for ssize_t or size_t. The format letter for these types ('z') handles them better, just like the 'j' does for intmax_t and uintmax_t. Bruce