public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
* [LTP] [PATCH 1/1] sparse-ltp: Fix bogus warning
@ 2024-05-28 12:17 Petr Vorel
  2024-06-04 11:44 ` Cyril Hrubis
  0 siblings, 1 reply; 2+ messages in thread
From: Petr Vorel @ 2024-05-28 12:17 UTC (permalink / raw)
  To: ltp

tst_tmpdir.c:347:6: warning: Symbol 'tst_purge_dir' has no prototype or
library ('tst_') prefix. Should it be static?

Fixes: abe9b1792 ("tools/sparse: Add static check")
Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
 tools/sparse/sparse-ltp.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/tools/sparse/sparse-ltp.c b/tools/sparse/sparse-ltp.c
index d649ee7b7..fff4bd4e6 100644
--- a/tools/sparse/sparse-ltp.c
+++ b/tools/sparse/sparse-ltp.c
@@ -148,9 +148,11 @@ static void check_symbol_visibility(const struct symbol *const sym)
 	if (sym->ident == &main_ident)
 		return;
 
-	warning(sym->pos,
-		"Symbol '%s' has no prototype or library ('tst_') prefix. Should it be static?",
-		name);
+	if (!has_lib_prefix) {
+		warning(sym->pos,
+			"Symbol '%s' has no prototype or library ('tst_') prefix. Should it be static?",
+			name);
+	}
 }
 
 /* See base_type() in dissect.c */
-- 
2.43.0


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-06-04 11:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-28 12:17 [LTP] [PATCH 1/1] sparse-ltp: Fix bogus warning Petr Vorel
2024-06-04 11:44 ` Cyril Hrubis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox