[Ns-developers] build warning/bug fixes patch
Mathieu Lacage
Mathieu.Lacage at sophia.inria.fr
Wed Jul 20 00:16:12 PDT 2005
On Tue, 2005-07-19 at 21:51 -0700, Tom Henderson wrote:
> > Some of the warnings from the validation link you provide above probably
> > come from the fact that this machine is using another libc with other
> > type definitions for certain system types.
> > For example:
> > cc1plus: warnings being treated as errors
> > diffusion3/filter_core/iolog.cc: In member function `virtual int*
> > IOLog::recvPacket(int)':
> > diffusion3/filter_core/iolog.cc:85: warning: int format, __time_t arg (arg 3)
> > diffusion3/filter_core/iolog.cc:85: warning: int format, __suseconds_t arg (arg
> > 4)
> > I don't really know how to fix this:
> > - ns-2 really should not be using printf for any kind of output: the C
> > ++-style streams solve this problem much better
> > - the printf specifiers for non-classic types really seem to be
> > OS/libc/compiler specific.
> >
> > The only reasonable suggestion I have for the short-term is to remove
> > any printf which tries to print system-level types by casting them to
> > non-standard types. This includes 64-bit types, pointers, etc.
> > Generally, one should only be printing int, long, short, or char with
> > printf.
> >
>
> For the moment, I favor backing out -Wall -Werror, so that we can
> restore the current validation. Presently, we don't have facility for
If you do not enable -Wall -Werror by default, the work I did is useless
because new warnings will creep in.
Another solution might be to add a configure switch --disable-werror
which removes -Werror if you specify it and leave -Werror in by default.
A patch which does this is located there:
http://www-sop.inria.fr/dream/personnel/Mathieu.Lacage/ns2/configure-2.patch
All you have to do now is to pass this extra argument to the configure
step of your tinderbox.
regards,
Mathieu
--
More information about the Ns-developers
mailing list