On Jul 13, 2011, at 7:23 AM, Bill Meier wrote:

> On 7/13/2011 8:05 AM, Jaap Keuter wrote:
>> Hi list,
>> 
>> I think we need a new GCC option added to configure.in:
>> 
>> AC_WIRESHARK_GCC_CFLAGS_CHECK(-Wno-unused-but-set-variable)
>> 
>> This option came into existence with GCC 4.6 and is causing havoc all over.
>> I've been going through a lot of dissectors, many of which have either:
>> * unused set variables
>> * variables set for a legitimate purpose, but not used (yet)
>> * bugs
>> 
> 
> I've fixes for a number of the (non-generated) dissectors and will commit 
> them today.

Haven't you (and maybe others) been fixing the same issues already, as a result 
of Coverity warnings about the same thing?

And how many of those are

static void
dissect_whatever(...)
{

                ...

        proto_tree_add_item(tree, hf_foo, tvb, offset, len_foo, encoding);
        offset += len_foo;
        proto_tree_add_item(tree, hf_bar, tvb, offset, len_bar, encoding);
        offset += len_bar;
}

and how many of those ultimately represent dissectors that should be converted 
to use ptvcursors, in which case the "offset +=" stuff will disappear into the 
ptvcursor code and not get whined about by dataflow analyzers?
___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <[email protected]>
Archives:    http://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
             mailto:[email protected]?subject=unsubscribe

Reply via email to