Wireshark-dev: Re: [Wireshark-dev] warning: unused parameter

From: Richard Sharpe <realrichardsharpe@xxxxxxxxx>
Date: Sun, 7 Feb 2021 14:22:00 -0800
On Sun, Feb 7, 2021 at 10:59 AM Paul Offord <paul.offord58@xxxxxxxxx> 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
(何以解憂?唯有杜康。--曹操)(传说杜康是酒的发明者)