ANNOUNCEMENT: Live Wireshark University & Allegro Packets online APAC Wireshark Training Session
April 17th, 2024 | 14:30-16:00 SGT (UTC+8) | Online

Wireshark-dev: Re: [Wireshark-dev] -Wmissing-prototypes ??

From: Evan Huus <eapache@xxxxxxxxx>
Date: Tue, 12 Mar 2013 23:07:22 -0400
The C++ standard requires prototypes for all functions, so g++
replaces gcc's -Wmissing-prototypes with a mandatory compiler error. I
assume that this was part of the C++ compatibility work that Anders
has been doing recently.

Evan

On Tue, Mar 12, 2013 at 10:55 PM, Bill Meier <wmeier@xxxxxxxxxxx> wrote:
> Anders:
>
> Just out of curiosity, why are the prototypes in the following change needed
> ?
>
>
> Or: maybe the real question is: why is -Wmissing_prototypes needed ?
>
> We already catch any .h files which are missing prototypes of global
> functions because we use -Wimplicit-function-declaration (part of -Wall).
>
> So: what am i missing ?
>
> Bill
>
>
>
>>
>> User: etxrab
>> Date: 2013/03/12 04:09 PM
>>
>> Log:
>>   - [-Wmissing-prototypes]
>
> --- packet-aodv.c       (revision 48273)
> +++ packet-aodv.c       (revision 48274)
> @@ -50,6 +50,8 @@
>   *     (both of the above two are draft-perkins-manet-aodv6-01.txt, which
>   *     is from November 2000)
>   */
> +void proto_register_aodv(void);
> +void proto_reg_handoff_aodv(void);
>
>  #define INET6_ADDRLEN  16
>  #define UDP_PORT_AODV  654
>
> ___________________________________________________________________________
> 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