[LTP] [PATCH] syscalls: Fix tst_res() format string for 64-bit offset

Cyril Hrubis chrubis@suse.cz
Mon Sep 12 11:52:46 CEST 2022


Hi!
> When compiling as 32-bit with _FILE_OFFSET_BITS=64, the format string
> needs to be specified as 64-bit long (%lld).
> Fix format string for type block_size.

This change introduces warnings on 64bit platform instead.
Unfortunatelly unlike the size_t and ssize_t which can be printed with
%zu and %zi there is no such thing for off_t. So the only way how to
actually print off_t correctly is to cast it to (long long int) in
addintion to changing the format string to %lli or %lld.

-- 
Cyril Hrubis
chrubis@suse.cz


More information about the ltp mailing list