Closed xamix closed 4 years ago
Apart from solving these warnings, you can get rid of them by considering µWebSockets as a system library, via the -isystem
flag. Gcc won't emit these warning messages as it considers you can't do anything about it.
From man gcc
:
The -isystem and -idirafter options also mark the directory as a system directory,
so that it gets the same special treatment that is applied to the standard system directories.
You can use clang-tidy to automatically fix these warnings:
http://clang.llvm.org/extra/clang-tidy/checks/misc-unused-parameters.html
but they are not really bugs or issues, so priority is about as low as can be (esp. given they are not turned on in default compilations).
I never got clang-tidy to work properly, it made changes I don't agree with and seemed wrong. If you want to manually comment out unused parameters, you can start with that and PR that alone. I will merge such a change.
Closing, you can send a PR
Hello,
I compile your library with GCC 9.2.1 on Ubuntu. There are lots of warning with
-Wunused-parameter
for example:Also there are some others warning with
-Wmissing-field-initializers
:Maybe I can work on it (comment the unused parameters) in order to remove the
-Wunused-parameter
warningFor the
-Wmissing-field-initializers
maybe check if you want some default values on unitialized fields?Regards