public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
* [LTP] [PATCH] safe_mmap(): Fix compiler warning in tst_res() format
@ 2024-05-07 15:52 Martin Doucha
  2024-05-07 16:59 ` Petr Vorel
  0 siblings, 1 reply; 2+ messages in thread
From: Martin Doucha @ 2024-05-07 15:52 UTC (permalink / raw)
  To: ltp

The length variable has type size_t so the appropriate format is %zu.

Signed-off-by: Martin Doucha <mdoucha@suse.cz>
---
 include/tst_safe_macros.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/tst_safe_macros.h b/include/tst_safe_macros.h
index f228b99e1..8de8ef106 100644
--- a/include/tst_safe_macros.h
+++ b/include/tst_safe_macros.h
@@ -281,7 +281,7 @@ static inline void *safe_mmap(const char *file, const int lineno,
 	tst_prot_to_str(prot, prot_buf);
 
 	tst_res_(file, lineno, TDEBUG,
-		"mmap(%p, %ld, %s(%x), %d, %d, %ld)",
+		"mmap(%p, %zu, %s(%x), %d, %d, %ld)",
 		addr, length, prot_buf, prot, flags, fd, offset);
 
 	rval = mmap(addr, length, prot, flags, fd, offset);
-- 
2.44.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-05-07 16:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-07 15:52 [LTP] [PATCH] safe_mmap(): Fix compiler warning in tst_res() format Martin Doucha
2024-05-07 16:59 ` Petr Vorel

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