Skip to content

Commit 67f1550

Browse files
mdouchapevik
authored andcommitted
safe_mmap(): Fix compiler warning in tst_res() format
The length variable has type size_t so the appropriate format is %zu. Link: https://lore.kernel.org/ltp/[email protected]/ Fixes: ff5f945 ("Print prot flag when SAFE_MMAP() fails") Reviewed-by: Petr Vorel <[email protected]> Signed-off-by: Martin Doucha <[email protected]>
1 parent 7841eed commit 67f1550

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/tst_safe_macros.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ static inline void *safe_mmap(const char *file, const int lineno,
281281
tst_prot_to_str(prot, prot_buf);
282282

283283
tst_res_(file, lineno, TDEBUG,
284-
"mmap(%p, %ld, %s(%x), %d, %d, %ld)",
284+
"mmap(%p, %zu, %s(%x), %d, %d, %ld)",
285285
addr, length, prot_buf, prot, flags, fd, offset);
286286

287287
rval = mmap(addr, length, prot, flags, fd, offset);

0 commit comments

Comments
 (0)