[PATCH] clean up compiler warnings in libc/stdio/vfprintf.c
Rob Landley
rob at landley.net
Thu Mar 8 15:39:46 PST 2007
On Thursday 08 March 2007 12:31 pm, Al Stone wrote:
> On Thu, 2007-03-08 at 14:35 +0000, Luciano Miguel Ferreira Rocha wrote:
> > On Thu, Mar 08, 2007 at 09:23:08AM -0500, Rob Landley wrote:
> > > On Thursday 08 March 2007 8:05 am, Luciano Miguel Ferreira Rocha wrote:
> > > > On Thu, Mar 08, 2007 at 07:51:47AM -0500, Rob Landley wrote:
> > > > > Is there any kind of --shutup-about-signedness-of-char-already flag
we can
> > > > > pass to the darn compiler?
> > > > >
> > > >
> > > > -Wno-pointer-sign?
> > > > Don't warn for pointer argument passing or assignment with different
> > > > signedness.
> > >
> > > Except that shuts it up for short, int and long as well.
> >
> > True, but, again, only for f(*arg) and *a = *v. Do you see problems
> > arising from that in your code? (Or most code, for that matter.)
>
> Personally, almost never.
>
> I'm sure it's a stylistic thing, but I personally prefer that
> there is explicit code to silence the warning; a global switch
> may inadvertently hide a warning I _should_ see.
I still can't get a switch to silence "may be used uninitialized" without
silencing "is used uninitialized".
> And, if for
> some reason something changes so that the cast no longer works
> properly, I like knowing that, too.
uClibc isn't just smaller than glibc, it's simpler. Cluttering the source
code with unnecessary casts for things that aren't actually problems, just to
make the compiler shut up, is wrong. (And adding casts in places that they
may hide future mistakes is also wrong.)
I'm all for silencing the warnings, but filling the code with typecasts is not
by itself an improvement.
Rob
--
Vista: Windows Millenium Second Edition
More information about the uClibc
mailing list