[LTP] [PATCH 1/3] tools/sparse: Add static check
Cyril Hrubis
chrubis@suse.cz
Tue Nov 30 12:43:58 CET 2021
Hi!
I guess that we can also silence some of the useless output by skipping
some old library crap as:
diff --git a/tools/sparse/sparse-ltp.c b/tools/sparse/sparse-ltp.c
index b1677d336..1a3b4089a 100644
--- a/tools/sparse/sparse-ltp.c
+++ b/tools/sparse/sparse-ltp.c
@@ -98,6 +98,9 @@ static void check_symbol_visibility(const struct symbol *const sym)
if (!(mod & MOD_TOPLEVEL))
return;
+ if (!strcmp(name, "TCID") || !strcmp(name, "TST_TOTAL"))
+ return;
+
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).",
Will send another patch.
--
Cyril Hrubis
chrubis@suse.cz
More information about the ltp
mailing list