safe_mmap(): Fix compiler warning in tst_res() format
PATCH 1/1 safe_mmap(): Fix compiler warning in tst_res() format
The length variable has type size_t so the appropriate format is %zu.
Signed-off-by Martin Doucha <[email protected]>
--- include/tst_safe_macros.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
include/tst_safe_macros.h +1 -1
@@ -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);
Signature · 5 lines
2.44.0 -- Mailing list info: https://lists.linux.it/listinfo/ltp
Hi Martin,
Quoted 1 line
The length variable has type
size_tso the appropriate format is %zu.
Indeed. Thank you, merged.
Kind regards,
Petr
Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp