[Ns-developers] build warning/bug fixes patch
tomh at tomh.org
Wed Jul 20 07:37:07 PDT 2005
>From: Mathieu Lacage [mailto:Mathieu.Lacage at sophia.inria.fr]
>Sent: Wednesday, July 20, 2005 07:16 AM
>To: 'Tom Henderson'
>Subject: Re: [Ns-developers] build warning/bug fixes patch
>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.
I do not think it is such a dire scenario-- it would be a temporary disabling (until we get a new set of tinderboxes). Meanwhile, anyone can enable it themselves if they want to check.
>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:
>All you have to do now is to pass this extra argument to the configure
>step of your tinderbox.
My preference is to see if we can enable that on the existing tinderbox. I'll check with ISI. Otherwise, I propose to temporarily disable -Werror by default, until we switch over to new tinderboxen.
More information about the Ns-developers