[LTP] [PATCH 2/2] sparse: Do not report static inline functions

Cyril Hrubis chrubis@suse.cz
Tue Nov 30 11:50:27 CET 2021


Since these are part of the library API and can be prefixed with tst_

Signed-off-by: Cyril Hrubis <chrubis@suse.cz>
---
 tools/sparse/sparse-ltp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/sparse/sparse-ltp.c b/tools/sparse/sparse-ltp.c
index 2f32bfa38..b1677d336 100644
--- a/tools/sparse/sparse-ltp.c
+++ b/tools/sparse/sparse-ltp.c
@@ -98,7 +98,7 @@ static void check_symbol_visibility(const struct symbol *const sym)
 	if (!(mod & MOD_TOPLEVEL))
 		return;
 
-	if (has_lib_prefix && (mod & MOD_STATIC)) {
+	if (has_lib_prefix && (mod & MOD_STATIC) && !(mod & MOD_INLINE)) {
 		warning(sym->pos,
 			"LTP-003: Symbol '%s' has the LTP public library prefix, but is static (private).",
 			name);
-- 
2.32.0



More information about the ltp mailing list