Ethereal-dev: Re: [Ethereal-dev] gcc warnings about unused variables

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Guy Harris <gharris@xxxxxxxxx>
Date: Wed, 27 Feb 2002 00:33:37 -0800
On Fri, Feb 15, 2002 at 04:34:48PM +0100, Joerg Mayer wrote:
> What I'd like to get right now is whether the approach is OK

The approach is OK, as long as you arrange that _U_ is defined as an
empty string in Microsoft Visual C++ as well.

> and whether the cases where I removed variables/functions are OK.

I guess one could ask whether "revcmp()" in "epan/int-64bit.c" should be
a general compare-in-reverse routine (in which case your change is
correct) or should be a compare-a-64-bit-integer routine (in which case
the "len" argument should be removed).  (Ronnie?)

I don't know whether "proto_find_protocol_multi()" and
"traverse_subtree_for_field()" are left over from when the protocol tree
code required items to be under a tree for the protocol to which they
belong, or not.  (Gilbert?)

I'll let Gilbert look at the changes to stuff in "epan/dfilter".

In Wiretap, I'm inclined not to put a _U_ in the definition of some of
the "open" routines, so that the warnings are a continuing reminder that
the routines really *should* do something with the "pointer to error
number" argument.

The "filetype" argument to the "can_write_encap" routines in Wiretap is
unnecessary - it's implicit, in that the routine being called is the
routine for the file type in question.