Re: [Wireshark-dev] warning: unused parameter
Description of _U_ : https://www.wireshark.org/lists/wireshark-dev/200609/msg00226.html Defined in https://gitlab.com/wireshark/wireshark/-/blob/master/ws_attributes.h On Sun, Feb 7, 2021 at 4:33 PM Guy Harris wrote: > On Feb 7, 2021, at 10:58 AM, Paul Offord wrote: > > > • Add conditional compile statements for the sharkd_loop function > declaration and all calls to it? > > * Add conditional compile statements around the entire sharkd_loop() > function, given that the vast majority of its code differs between UN*X and > Windows, with the Windows version not adding _U_ to the arguments and the > UN*X version adding _U_ to the arguments? > > > • Add something to the *NIX version of the code to use the > parameters? > > So how does the Windows version use the parameters? > ___ > Sent via:Wireshark-dev mailing list > Archives:https://www.wireshark.org/lists/wireshark-dev > Unsubscribe: https://www.wireshark.org/mailman/options/wireshark-dev > mailto:wireshark-dev-requ...@wireshark.org > ?subject=unsubscribe ___ Sent via:Wireshark-dev mailing list Archives:https://www.wireshark.org/lists/wireshark-dev Unsubscribe: https://www.wireshark.org/mailman/options/wireshark-dev mailto:wireshark-dev-requ...@wireshark.org?subject=unsubscribe
Re: [Wireshark-dev] warning: unused parameter
On Feb 7, 2021, at 10:58 AM, Paul Offord wrote: > • Add conditional compile statements for the sharkd_loop function > declaration and all calls to it? * Add conditional compile statements around the entire sharkd_loop() function, given that the vast majority of its code differs between UN*X and Windows, with the Windows version not adding _U_ to the arguments and the UN*X version adding _U_ to the arguments? > • Add something to the *NIX version of the code to use the parameters? So how does the Windows version use the parameters? ___ Sent via:Wireshark-dev mailing list Archives:https://www.wireshark.org/lists/wireshark-dev Unsubscribe: https://www.wireshark.org/mailman/options/wireshark-dev mailto:wireshark-dev-requ...@wireshark.org?subject=unsubscribe
Re: [Wireshark-dev] warning: unused parameter
On Sun, Feb 7, 2021 at 10:59 AM Paul Offord wrote: > > I submitted some code to GitLab for merging and I got a couple of warnings > from the pipeline that builds in the Ubuntu environment: > > ../sharkd_daemon.c:361:17: warning: unused parameter 'argc' > [-Wunused-parameter] > sharkd_loop(int argc, char* argv[]) > ^ > ../sharkd_daemon.c:361:29: warning: unused parameter 'argv' > [-Wunused-parameter] > sharkd_loop(int argc, char* argv[]) > ^ > It's true that argc and argv are not used in a *NIX build but are used in a > Windows build. > > What's the correct way to handle this? Should I: > > Ignore the warnings? > Add conditional compile statements for the sharkd_loop function declaration > and all calls to it? > Add something to the *NIX version of the code to use the parameters? Do you really need the parameter? If so, does adding _U_ after it not fix the problem? -- Regards, Richard Sharpe (何以解憂?唯有杜康。--曹操)(传说杜康是酒的发明者) ___ Sent via:Wireshark-dev mailing list Archives:https://www.wireshark.org/lists/wireshark-dev Unsubscribe: https://www.wireshark.org/mailman/options/wireshark-dev mailto:wireshark-dev-requ...@wireshark.org?subject=unsubscribe