Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 24 May 2012 17:00:22 +1000 (EST)
From:      Bruce Evans <brde@optusnet.com.au>
To:        d@delphij.net
Cc:        svn-src-head@freebsd.org, "Bjoern A. Zeeb" <bzeeb-lists@lists.zabbadoz.net>, svn-src-all@freebsd.org, src-committers@freebsd.org, Xin LI <delphij@freebsd.org>
Subject:   Re: svn commit: r235822 - in head: sys/dev/esp sys/gnu/fs/xfs/FreeBSD usr.sbin/ppp usr.sbin/rpc.lockd
Message-ID:  <20120524163735.E1094@besplex.bde.org>
In-Reply-To: <4FBD2393.708@delphij.net>
References:  <201205230649.q4N6nofV053886@svn.freebsd.org> <CE6F7CFA-15DE-4819-A450-B41B7065A37F@lists.zabbadoz.net> <4FBD2393.708@delphij.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 23 May 2012, Xin Li wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA256
>
> On 05/23/12 07:56, Bjoern A. Zeeb wrote:
>>
>> On 23. May 2012, at 06:49 , Xin LI wrote:
>>
>>> Author: delphij Date: Wed May 23 06:49:50 2012 New Revision:
>>> 235822 URL: http://svn.freebsd.org/changeset/base/235822
>>>
>>> Log: Fix build:
>>>
>>> - Use %ll instead of %q for explicit long long casts; - Use %j
>>> instead of %q in XFS and cast to intmax_t.
>>>
>>> Tested with:	make universe
>>
>>
>> I am still seeing XLP64 failing to compile:
>>
>> cc1: warnings being treated as errors
>> /scratch2/tmp/bz/HEAD.svn/sys/geom/geom_flashmap.c: In function
>> 'g_flashmap_print':
>> /scratch2/tmp/bz/HEAD.svn/sys/geom/geom_flashmap.c:82: warning:
>> format '%08llx' expects type 'long long unsigned int', but argument
>> 2 has type 'off_t' [-Wformat]
>> /scratch2/tmp/bz/HEAD.svn/sys/geom/geom_flashmap.c:82: warning:
>> format '%08llx' expects type 'long long unsigned int', but argument
>> 3 has type 'off_t' [-Wformat]
>> /scratch2/tmp/bz/HEAD.svn/sys/geom/geom_flashmap.c:82: warning:
>> format '%llu' expects type 'long long unsigned int', but argument 5
>> has type 'off_t' [-Wformat]
>
> Weird, I don't know why I didn't caught this :-/  It seems that
> 'universe_kernel' does not do things after an existing universe build?

Well, new printf format errors/style bugs involving %ll have little to
do with old ones involving %q, even if they are not even style bugs but
fatal type mismatches.

> Should be fixed in r235849.

The following bugs remain:
- bogus types off_t for sl_start and sl_end.  The typedef for file offsets
   is very inappropriate for disk offsets.  But this seems to be a generic
   bug in geom.
- printing the signed type off_t using the unsigned formats %...x and
   %...u.  (The casts are to unsigned to match the formats.)
- printing sl_start and sl_end in hex format
- printing sl_start and sl_end in %08jx format:
   - this hex format doesn't even use '%#' or '0x%', so it is ambiguous
   - the output is not in tab format, so '08' is not needed to line it up
   - 08 doesn't even work for lining things up, except for 32-bit values.
     016 might work for 64-bit values.  But for general uint64_t values,
     there is no correct field width to use.

Bruce



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20120524163735.E1094>