Wireshark mailing list archives

Re: Change in wireshark[master]: Remove unneeded #includes from epan/dissectors


From: Bill Meier <wmeier () newsguy com>
Date: Fri, 19 Dec 2014 23:28:33 -0500

On 12/19/2014 4:19 PM, Bill Meier wrote:
On 12/19/2014 12:05 PM, Martin Mathieson (Code Review) wrote:

Change subject: Remove unneeded #includes from epan/dissectors
......................................................................

Remove unneeded #includes from epan/dissectors


Martin:

Obviously, #includes usage in dissectors is a bit of a mish-mosh


Of the ~1130 non-generated .c files in epan/dissectors, there's about
350 which don't have '#include <epan/packet.h>' at all and maybe another
50 which don't have the include as the first wireshark include.



Update: My analysis above was incorrect. It was done on the dissector files *after* the "remove unneeded #includes" patch was applied.

The correct numbers (based upon the current epan/dissectors/ files).

         1127 non-generated epan/dissectors/*.c files:

           44 w/o packet.h at all
           58 with packet.h not first before other wireshark includes
         1025 appear OK

So: I conclude:

1. The current "remove unneeded #includes" patch ends up removing
   a number of 'include <epan/packet.h>' which I think is the not the
   best way to go.

2. There's only ~ 100 non-generated files in epan/dissectors which need
   to be changed so that packet.h is included first before other
   Wireshark includes.

I will make the changes (for packet.h & related) to the epan/dissector .c files and upload the changes to Gerrit in the next day or so.

Bill

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


Current thread: