Wireshark mailing list archives

warning: unused parameter


From: Paul Offord <paul.offord58 () gmail com>
Date: Sun, 7 Feb 2021 18:58:26 +0000

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?


Thanks and regards...Paul
-- 

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

Current thread: