From owner-cvs-all@FreeBSD.ORG Sat Jun 10 19:10:28 2006 Return-Path: X-Original-To: cvs-all@FreeBSD.org Delivered-To: cvs-all@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 022A616A8AD; Sat, 10 Jun 2006 19:10:28 +0000 (UTC) (envelope-from yar@comp.chem.msu.su) Received: from comp.chem.msu.su (comp.chem.msu.su [158.250.32.97]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2D4D447CCB; Sat, 10 Jun 2006 13:31:25 +0000 (GMT) (envelope-from yar@comp.chem.msu.su) Received: from comp.chem.msu.su (localhost [127.0.0.1]) by comp.chem.msu.su (8.13.4/8.13.3) with ESMTP id k5ADVJuO004462; Sat, 10 Jun 2006 17:31:19 +0400 (MSD) (envelope-from yar@comp.chem.msu.su) Received: (from yar@localhost) by comp.chem.msu.su (8.13.4/8.13.3/Submit) id k5ADVGEH004461; Sat, 10 Jun 2006 17:31:16 +0400 (MSD) (envelope-from yar) Date: Sat, 10 Jun 2006 17:31:16 +0400 From: Yar Tikhiy To: Craig Rodrigues Message-ID: <20060610133116.GA4017@comp.chem.msu.su> References: <200606090657.k596v04m037835@repoman.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200606090657.k596v04m037835@repoman.freebsd.org> User-Agent: Mutt/1.5.9i Cc: cvs-src@FreeBSD.org, src-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/gnu/fs/xfs xfs_fs.h X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Jun 2006 19:10:28 -0000 On Fri, Jun 09, 2006 at 06:57:00AM +0000, Craig Rodrigues wrote: > rodrigc 2006-06-09 06:57:00 UTC > > FreeBSD src repository > > Modified files: > sys/gnu/fs/xfs xfs_fs.h > Log: > Change %llx to %jx in printf() to eliminate warnings on 64-bit platforms. > > Revision Changes Path > 1.3 +1 -1 src/sys/gnu/fs/xfs/xfs_fs.h > =================================================================== > RCS file: /usr/local/www/cvsroot/FreeBSD/src/sys/gnu/fs/xfs/xfs_fs.h,v > retrieving revision 1.2 > retrieving revision 1.3 > diff -u -p -r1.2 -r1.3 > --- src/sys/gnu/fs/xfs/xfs_fs.h 2006/06/09 06:04:03 1.2 > +++ src/sys/gnu/fs/xfs/xfs_fs.h 2006/06/09 06:57:00 1.3 > @@ -129,7 +129,7 @@ struct getbmapx { > p2.bmv_count = p1.bmv_count; \ > p2.bmv_entries = p1.bmv_entries; \ > \ > -printf("offset 0x%llx block 0x%llx length 0x%llx count 0x%llx entries %d\n", \ > +printf("offset 0x%jx block 0x%jx length 0x%jx count 0x%jx entries %d\n", \ > (uint64_t)p2.bmv_offset, \ > (uint64_t)p2.bmv_block, \ > (uint64_t)p2.bmv_length, \ I'm afraid this is still not quite correct. AFAIK, one should not assume that uintmax_t is the same as uint64_t; it's a mere coincidence we have now. The casts should be changed, too, from (uint64_t) to (uintmax_t). Then it will become the only safe way to printf an integer of a non-basic type. -- Yar