misc: fix some printf format strings
Fix the warnings below for OSX clang and add a few more casts for timeval: lib/at.c:131:27: warning: format specifies type 'intmax_t' (aka 'long') but the argument has type 'off_t' (aka 'long long') [-Wformat] printf("%16jd bytes ", st.st_size); ~~~~~ ^~~~~~~~~~ lib/strutils.c:522:52: warning: format specifies type 'intmax_t' (aka 'long') but the argument has type 'uint64_t' (aka 'unsigned long long') [-Wformat] snprintf(buf, sizeof(buf), "%d%s%jd%s", dec, dp, frac, suffix); ~~~ ^~~~ lib/sysfs.c:468:42: warning: format specifies type 'uintmax_t' (aka 'unsigned long') but the argument has type 'uint64_t' (aka 'unsigned long long') [-Wformat] len = snprintf(buf, sizeof(buf), "%ju", num); ~~~ ^~~ libuuid/src/gen_uuid.c:316:34: warning: format specifies type 'unsigned long' but the argument has type '__darwin_suseconds_t' (aka 'int') [-Wformat] clock_seq, last.tv_sec, last.tv_usec, adjustment); ^~~~~~~~~~~~ Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
This commit is contained in:
parent
948d1f3114
commit
7231fb2a5b
7 changed files with 20 additions and 19 deletions
|
@ -519,7 +519,7 @@ char *size_to_human_string(int options, uint64_t bytes)
|
|||
|
||||
if (!dp || !*dp)
|
||||
dp = ".";
|
||||
snprintf(buf, sizeof(buf), "%d%s%jd%s", dec, dp, frac, suffix);
|
||||
snprintf(buf, sizeof(buf), "%d%s%" PRIu64 "%s", dec, dp, frac, suffix);
|
||||
} else
|
||||
snprintf(buf, sizeof(buf), "%d%s", dec, suffix);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue