From owner-freebsd-current@FreeBSD.ORG Sat Jan 20 19:57:02 2007 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 298AA16A400 for ; Sat, 20 Jan 2007 19:57:02 +0000 (UTC) (envelope-from max@love2party.net) Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.183]) by mx1.freebsd.org (Postfix) with ESMTP id A982013C459 for ; Sat, 20 Jan 2007 19:57:01 +0000 (UTC) (envelope-from max@love2party.net) Received: from [88.66.30.98] (helo=amd64.laiers.local) by mrelayeu.kundenserver.de (node=mrelayeu2) with ESMTP (Nemesis), id 0MKwtQ-1H8MKc47Fr-000322; Sat, 20 Jan 2007 20:56:55 +0100 From: Max Laier Organization: FreeBSD To: freebsd-current@freebsd.org Date: Sat, 20 Jan 2007 20:56:44 +0100 User-Agent: KMail/1.9.5 References: <20070120182210.56EBD73034@freebsd-current.sentex.ca> <20070120203242.61bf253d@Magellan.Leidinger.net> In-Reply-To: <20070120203242.61bf253d@Magellan.Leidinger.net> X-Face: ,,8R(x[kmU]tKN@>gtH1yQE4aslGdu+2]; R]*pL,U>^H?)gW@49@wdJ`H<=?utf-8?q?=25=7D*=5FBD=0A=09U=5For=3D=5CmOZf764=26nYj=3DJYbR1PW0ud?=>|!~,,CPC.1-D$FG@0h3#'5"k{V]a~.<=?utf-8?q?mZ=7D44=23Se=7Em=0A=09Fe=7E=5C=5DX5B=5D=5Fxj?=(ykz9QKMw_l0C2AQ]}Ym8)fU MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart584704435.sdW9kyYMz7"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200701202056.53825.max@love2party.net> X-Provags-ID: kundenserver.de abuse@kundenserver.de login:61c499deaeeba3ba5be80f48ecc83056 Cc: amd64@freebsd.org, Alexander Leidinger , FreeBSD Tinderbox Subject: Re: [head tinderbox] failure on amd64/amd64 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 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: Sat, 20 Jan 2007 19:57:02 -0000 --nextPart584704435.sdW9kyYMz7 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Saturday 20 January 2007 20:32, Alexander Leidinger wrote: > Quoting FreeBSD Tinderbox (Sat, 20 Jan 2007=20 13:22:10 -0500 (EST)): > > /src/sys/compat/linprocfs/linprocfs.c: In function > > `linprocfs_doprocstat': /src/sys/compat/linprocfs/linprocfs.c:478: > > warning: int format, different type arg (arg 3) *** Error code 1 > > Does someone has a table of common 32/64 bit printf issues and the > corresponding DTRT handling of the issues? To fix this I used something > which I did found somewhere in the kernel, but I'm not sure if it is > the best way to fix it. I could have casted it to int instead of > keeping the precision sizeof() is offering (casting to intmax_t and > using a different printf format type). At this place this would have > been enough. The root of the problem is that we have different typedefs for (u_)int64_t= =20 in 32 and 64 bit archs. Specifically, we use "(unsigned) long" on 64 bit=20 archs while 32 bit archs use "(unsigned) long long". As intmax_t is an=20 alias for int64_t this means also that intmax_t is "shorter" (for some=20 definition) than "long long". I still think that we should make it "long=20 long" on all archs as Net- and OpenBSD do. There are the dreaded PRI... macros that are supposed to fix this, but=20 that is really ugly. In general, a cast to intmax_t and %j or long long=20 and %ll seems to be the preferred sollution. =2D-=20 /"\ Best regards, | mlaier@freebsd.org \ / Max Laier | ICQ #67774661 X http://pf4freebsd.love2party.net/ | mlaier@EFnet / \ ASCII Ribbon Campaign | Against HTML Mail and News --nextPart584704435.sdW9kyYMz7 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (FreeBSD) iD8DBQBFsnQFXyyEoT62BG0RAvHjAJ9JEbOr12nICI4+Sh1ayBNpTcqdJgCfWrhB BCY66HZOcWvpVbdcgl+NM9U= =Nx2H -----END PGP SIGNATURE----- --nextPart584704435.sdW9kyYMz7--