-wunused-function(注意:通常应该是-Wunused-function,大写W表示警告选项)编译选项的作用是警告关于未使用的函数。当编译器在源代码中发现定义了但从未调用过的函数时,它会生成警告信息。这有助于开发者清理无用代码,保持代码库的整洁和高效。 3. 在编译过程中如何结合使用-werror和-Wunused-function 在编译过程中,...
实时操作系统的项目。在编译过程中,编译器可能会生成一些警告,如 `-Wunused-function` 和 `-Wunused-...
The -Wunused-function diagnostic does not know how to connect an alias target to an internal linkage declaration, so we will get a false positive. static int f1() { return 42; } // cxx-warning{{unused function 'f1'}} int g1() __attribute__((alias("?f1@@YAHXZ"))); This can...
Header files commonly contain inline function definitions, like static inline bool streq(const char *s1, const char *s2) { return strcmp(s1, s2) == 0; } Do not report those as clang(-Wunused-function). System information Clangd version: ...
Bug report Bug description: Popped up during build in non-debug mode: Python/import.c:1555:1: warning: unused function 'is_core_module' [-Wunused-function] is_core_module(PyInterpreterState *interp, PyObject *name, PyObject *path) ^ and ...
#31045 introduced -werror to test each commit, which makes things like Wunused-member-function an error now. This feels pretty aggressive in the cases where some methods may be defined in isolation in commit A, and then used elsewhere in commit B (following A). 👍 1 ...
‘compiler_is_top_level_await’ defined but not used [-Wunused-function]#123553 Closed Eclips4 opened this issue Sep 1, 2024· 0 comments · Fixed by #123578 Comments Member Eclips4 commented Sep 1, 2024 • edited by bedevere-app bot Bug report Bug description: Popped up in https...