Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

Wireshark-dev: Re: [Wireshark-dev] Dissector functions and variables that could be static

From: Martin Mathieson <martin.r.mathieson@xxxxxxxxxxxxxx>
Date: Sun, 24 Jan 2021 23:06:17 +0000


On Sun, Jan 24, 2021 at 8:27 PM Jirka Novak <j.novak@xxxxxxxxxxxx> wrote:
Hi,

  I checked the code I know:

> epan/dissectors/packet-rtp-events.c (00000000000001a0 D> rtp_event_type_values_ext) is not referred to so could be static? (in>
header)
It is used in UI, outside of dissectors. Therefore it should be exported.


Yes, I can have the script also check for references from the object files in ui to avoid reporting cases like this.

> epan/dissectors/packet-rtp.c (00000000000006d0 T rtp_dyn_payload_remove)
> is not referred to so could be static? (in header)
> epan/dissectors/packet-rtp.c (0000000000000660 T
> rtp_dyn_payload_replace) is not referred to so could be static? (in header)

I think these 2 functions can be removed.

> epan/dissectors/packet-rtps.c (0000000000000e20 D class_id_enum_names)
> is not referred to so could be static?


This variable is able to become static.

That two functions are not used at all. Can we remove them?

                                                Best regards,

                                                        Jirka Novak