clang inadequately reports "implicit function declaration" even if there is no function call in the code when the compiler has built-in replacement for popular function, like "stpncpy". For example, the compiler may warn about (void) stpncpy; This is definitely not implicit function declaration. The warnings from compiler is propagated to portage QA warning, giving false positive results. Looks like that functions without built-in equivalent do not trigger clang false positive warnings. See https://bugs.gentoo.org/923760#c4 for examples. In overall, the construct "(void) function_name;" must not trigger QA warning as it is not an implicit function declaration. Reproducible: Always
I just wrote about this last night: https://github.com/mesonbuild/meson/issues/9140#issuecomment-2123819144 It's a clang bug, open since 2017.
Thanks for the link. I've updated the clang upstream bug as well: https://github.com/llvm/llvm-project/issues/33905#issuecomment-2124621376