[Ocfs2-devel] Request to remove -Wfno-format

Rusty Lynch rusty at linux.co.intel.com
Fri Feb 13 17:37:48 CST 2004


On Fri, Feb 13, 2004 at 05:04:24PM -0800, Manish Singh wrote:
> On Fri, Feb 13, 2004 at 04:06:54PM -0800, Rusty Lynch wrote:
> > On Fri, Feb 13, 2004 at 02:15:37PM -0800, Manish Singh wrote:
> > <snip>
> > > Well, I really meant "%Zu". 'z' is a modifier that was introduced in C99,
> > > but it's only in very recent 2.4.x printk implementations, i.e. none of 
> > > current AS 2.1, EL3, or UL have it, which means we can't use it. 'Z' is
> > > GNU extension (that's deprecated now in favor of the C99 modifier) that
> > > *is* in all the printks we need to support, so we should use that.
> > > __attribute__ format should know about both anyway.
> > 
> > Any ideas on cleanly printing sector_t? In 2.4 it was always a u32, now it
> > is architecture dependent (u32 by default but set to u64 by most architectures
> > including ia32 and ia64.)
> 
> I'd suggest always casting to u64 and using %Lu.

How would you feel about always casting to (unsigned long long)?  u64 is unsigned long
on some arch's and unsigned long long on others.  Specifically, we get warnings
on ia64 and ppc64 since they both define u64 as unsigned long.

    --rusty


More information about the Ocfs2-devel mailing list