Wireshark-dev: Re: [Wireshark-dev] About Dead Store in clang Analysis
From: Dirk Jagdmann <doj@xxxxxxxxx>
Date: Thu, 24 Mar 2011 13:47:00 -0700
> What it the official solution to fix this ?
> 1) Remove the code
> 2) Ignore this warning
> 3) Comment the code  add a
>  /*     offset += 1;  Remove Clang Dead increment */

I would say configure clang to not emit this warning. This idiom of adding a
proto_item and then incrementing the offset is well proven throughout the code.
Having that additional integer increment will not result in wasted CPU cycles.

And if you have an incomplete dissector if the correct offset increment is used,
you will not introduce a bug when adding additional proto_items.

-- 
---> Dirk Jagdmann
----> http://cubic.org/~doj
-----> http://llg.cubic.org