All of lore.kernel.org
 help / color / mirror / Atom feed
* [Ocfs2-devel] Request to remove -Wfno-format
@ 2004-02-12 12:39 Rusty Lynch
  2004-02-12 12:52 ` Rusty Lynch
  2004-02-12 14:30 ` Manish Singh
  0 siblings, 2 replies; 16+ messages in thread
From: Rusty Lynch @ 2004-02-12 12:39 UTC (permalink / raw)
  To: ocfs2-devel

While porting to 2.6 I am just using the 2.6 build system and putting off 
the autoconfig stuff till later. As a result of this I am seeing a ton of 
additional warning messages due to the fact that the ocfs2 build system is 
including "-Wno-format".

Is there a good reason for adding the "-Wno-format" option to the build?

The kind of mistakes that are being ignored are ==>

LOG_TRACE_ARGS("found some data to free (%u.%u)\n", 
               HI(cur_extent->this_ext), LO(cur_extent->this_ext));
alloc.c: In function `ocfs_kill_this_tree':
alloc.c:1620: warning: unsigned int format, long unsigned int arg (arg 2)
alloc.c:1620: warning: unsigned int format, long unsigned int arg (arg 3)
alloc.c:1638: warning: unsigned int format, long unsigned int arg (arg 2)
alloc.c:1638: warning: unsigned int format, long unsigned int arg (arg 3)


and ==> 
LOG_TRACE_ARGS("Popping this header (%u.%u)\n",
               HI(AllocExtent->this_ext), 
               LO(AllocExtent->this_ext), 
               AllocExtent->next_free_ext);
alloc.c:2079: warning: unsigned int format, long unsigned int arg (arg 2)
alloc.c:2079: warning: unsigned int format, long unsigned int arg (arg 3)
alloc.c:2079: warning: too many arguments for format
alloc.c:2099: warning: unsigned int format, long unsigned int arg (arg 2)
alloc.c:2099: warning: unsigned int format, long unsigned int arg (arg 3)


If it is ok, I would like to make the build more strict, and treat each of
the warnings as bugs.

    --rusty

^ permalink raw reply	[flat|nested] 16+ messages in thread
* [Ocfs2-devel] Request to remove -Wfno-format
@ 2004-02-17  8:50 Cahill, Ben M
  0 siblings, 0 replies; 16+ messages in thread
From: Cahill, Ben M @ 2004-02-17  8:50 UTC (permalink / raw)
  To: ocfs2-devel

Code in OpenGFS does something similar, but with a smaller macro label:
FMT_64

It's just a little more compact than Rusty's suggestion.

-- Ben --

> -----Original Message-----
> From: ocfs2-devel-bounces@oss.oracle.com 
> [mailto:ocfs2-devel-bounces@oss.oracle.com] On Behalf Of Rusty Lynch
> Sent: Friday, February 13, 2004 10:22 PM
> To: Mark Fasheh
> Cc: ocfs2-devel@oss.oracle.com
> Subject: Re: [Ocfs2-devel] Request to remove -Wfno-format
> 
> 
> On Fri, Feb 13, 2004 at 07:18:41PM -0800, Mark Fasheh wrote:
> > On Fri, Feb 13, 2004 at 07:09:40PM -0800, Rusty Lynch wrote:
> > > I have something here that instead of doing crazy cast, 
> with define a U64_MODIFIER
> > > that will expand appropriatly.  So... it's always correct 
> and much easier on the eyes.
> > > 
> > > printk's would look something like:
> > > 
> > > printk(KERN_DEBUG "size_t is %Zu, and a u64 is " 
> U64_MODIFIER "\n", asize, au64value);
> > > 
> > > Let me do one more verification on the patch and I will 
> send it out.
> > > 
> > >     --rusty
> > 
> > Have you seen how often we print out __u64's? I predict 
> that chopping up our
> > format strings with that will be much uglier than a cast macro ;)
> > 	--Mark
> > 
> 
> Take a look at the following and see if it's too much.
> 
>     --rusty
> 
> 

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2004-02-17  8:50 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-02-12 12:39 [Ocfs2-devel] Request to remove -Wfno-format Rusty Lynch
2004-02-12 12:52 ` Rusty Lynch
2004-02-12 14:30 ` Manish Singh
2004-02-13 16:10   ` Rusty Lynch
2004-02-12 21:44     ` Manish Singh
2004-02-13 16:10       ` Rusty Lynch
2004-02-13 16:15         ` Manish Singh
2004-02-13 16:24           ` Rusty Lynch
2004-02-13 18:07           ` Rusty Lynch
2004-02-13 19:04             ` Manish Singh
2004-02-13 19:37               ` Rusty Lynch
2004-02-13 21:05                 ` Manish Singh
2004-02-13 21:09                   ` Rusty Lynch
2004-02-13 21:18                     ` Mark Fasheh
2004-02-16 15:01                       ` Rusty Lynch
  -- strict thread matches above, loose matches on Subject: below --
2004-02-17  8:50 Cahill, Ben M

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.