Wireshark-dev: Re: [Wireshark-dev] Finding duplicate (conflicting) value_string entries
From: Martin Mathieson <martin.r.mathieson@xxxxxxxxxxxxxx>
Date: Thu, 19 May 2011 02:29:33 +0100


On Wed, May 18, 2011 at 10:12 PM, Jeff Morriss <jeff.morriss.ws@gmail.com> wrote:
Martin Mathieson wrote:



On Wed, May 18, 2011 at 4:49 PM, Jakub Zawadzki <darkjames-ws@xxxxxxxxxxxx <mailto:darkjames-ws@xxxxxxxxxxxx>> wrote:

   On Wed, May 18, 2011 at 05:39:32PM +0200, Alexis La Goutte wrote:
    > I think it is better to add this check in checkAPIs.pl script

   Well it's little hard to do this in checkAPIs.pl cause we need
   preprocessor,
   and some value_string (like tpncp) are generated from file.

   This patch is OK for me.



I didn't measure, but it didn't noticibly add to the startup time (I ran ./wireshark >& duplicated.txt).  It is ugly to dump so much into a console.... probably not many non-developers run wireshark that way though.  I wasn't planning on submitting it in its current form.

Well, it serves a useful purpose.  It could always be checked in but #if'd out (only to be turned on periodically by an interested developer).


I submitted it with #if 0 for now.  It would be good to be able to configure with developer checks.  I'm thinking that seeing such warnings would annoy me into fixing them...

This reminds me of another patch I wrote a long time ago (but that I can no longer find).  It looked at the bitmask and worked out if there were any 0s between the first and last 1s.  I know that I've added some fields with gaps in them myself, but genuine cases must be pretty rare....  This one might lend itself better to scripting though.

Martin
 
___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <wireshark-dev@xxxxxxxxxxxxx>
Archives:    http://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
           mailto:wireshark-dev-request@xxxxxxxxxxxxx?subject=unsubscribe