-Wunused-function
Warn whenever a static function is declared but not defined or a non\-inline static function is unused.
-Wunused
All all the above -Wunused options combined.
In order to get a warning about an unused function parameter, you must either specify -W -Wunused or separately specify -Wunused-parameter.
-Werror
Make all warnings into errors.
I found gcc erroring, with unused and error turned on, if I'm including a hpp and a function isn't being used.
find doesn't need [[maybe_unused]] because it's used by found.
https://gcc.gnu.org/onlinedocs/gcc-3.2/gcc/Warning-Options.html
I found gcc erroring, with unused and error turned on, if I'm including a hpp and a function isn't being used.
find
doesn't need[[maybe_unused]]
because it's used byfound
.https://docs.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warning-level-4-c4505?view=msvc-160 Though on msvc it ignores
[[maybe_unused]]
So I had to suppress the warning./wd4505 # suppress unreferenced local function has been removed.