tcpdump mailing list archives

Re: A few compiler warnings


From: Guy Harris <guy () alum mit edu>
Date: Tue, 23 Dec 2003 15:05:30 -0800


On Dec 23, 2003, at 1:41 PM, Michael Richardson wrote:

Is this a correct summary:
   1) it builds with native compilers, and works.

...as long as you remove "-std1" from the compiler options on Tru64 5.1 (but that problem isn't new in 3.7.x). It looks as if the builds Albert Chin did didn't use that flag.

That flag's been set by aclocal.m4 since tcpdump 3.4; perhaps we started using some construct that's not allowed by strict ANSI mode.

Don, what were the errors you got with "-std1" set?

2) there are numerous warnings, which may be hard to fix in a consistent
      way.

Some are easy and probably safe to fix, such as the print-fr.c one - there was another such error that I saw in print-fr.c in Albert Chin's build - I'm not sure whether I missed the addr_len one or if it didn't show up for some reason.

Some are perhaps a little less obviously safe, such as the AIX undeclared struct warnings (I don't know whether that'd break AIX builds on other versions of AIX).

Some might require a little thought, such as the "u_int XXX = -1" warnings. I don't know whether the right fix is to make the variables signed (so you can assign -1, as an obvious out-of-band indicator, to them without a warning) or to cast -1 to "u_int". That one's been around for a while.

Some probably shouldn't be fixed, such as the HP-UX 11.00 one - that's a known HP-UX bug, and apparently fixed in 11i or 11.11 or whatever the release after 11.00 is called. That probably also applies to the "ether_ntohost()" one (unless it *legitimately* leaves the "const" out, i.e. it really *might* step on the argument, in which case we'd need to do more work).

-
This is the TCPDUMP workers list. It is archived at
http://www.tcpdump.org/lists/workers/index.html
To unsubscribe use mailto:tcpdump-workers-request () tcpdump org?body=unsubscribe


Current thread: