From: Ruediger Meier Date: Wed, 26 Oct 2016 21:04:44 +0000 (+0200) Subject: misc: once again some printf format strings X-Git-Tag: v2.29~24^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=eaaf0e7e378c3f0477008ac2da389c7e3b6652bd;p=thirdparty%2Futil-linux.git misc: once again some printf format strings Signed-off-by: Ruediger Meier --- diff --git a/libblkid/src/probe.c b/libblkid/src/probe.c index da6720daee..ea50f5a6b3 100644 --- a/libblkid/src/probe.c +++ b/libblkid/src/probe.c @@ -756,7 +756,7 @@ static int is_sector_readable(int fd, uint64_t sector) return 1; failed: - DBG(LOWPROBE, ul_debug("CDROM: read sector %ju failed %m", sector)); + DBG(LOWPROBE, ul_debug("CDROM: read sector %"PRIu64" failed %m", sector)); errno = 0; return 0; } diff --git a/libblkid/src/superblocks/zfs.c b/libblkid/src/superblocks/zfs.c index c41f769905..02fa95675e 100644 --- a/libblkid/src/superblocks/zfs.c +++ b/libblkid/src/superblocks/zfs.c @@ -87,7 +87,7 @@ static void zfs_extract_guid_name(blkid_probe pr, loff_t offset) memcpy(buff, p, sizeof(buff)); nvl = (struct nvlist *) buff; - DBG(LOWPROBE, ul_debug("zfs_extract: nvlist offset %jd\n", offset)); + DBG(LOWPROBE, ul_debug("zfs_extract: nvlist offset %jd\n", (intmax_t)offset)); nvp = &nvl->nvl_nvpair; while (left > sizeof(*nvp) && nvp->nvp_size != 0 && found < 3) { @@ -176,14 +176,14 @@ static int find_uberblocks(const void *label, loff_t *ub_offset, int *swap_endia *ub_offset = offset; *swap_endian = 0; found++; - DBG(LOWPROBE, ul_debug("probe_zfs: found little-endian uberblock at %jd\n", offset >> 10)); + DBG(LOWPROBE, ul_debug("probe_zfs: found little-endian uberblock at %jd\n", (intmax_t)offset >> 10)); } if (ub->ub_magic == swab_magic) { *ub_offset = offset; *swap_endian = 1; found++; - DBG(LOWPROBE, ul_debug("probe_zfs: found big-endian uberblock at %jd\n", offset >> 10)); + DBG(LOWPROBE, ul_debug("probe_zfs: found big-endian uberblock at %jd\n", (intmax_t)offset >> 10)); } } diff --git a/libfdisk/src/item.c b/libfdisk/src/item.c index 31637a1f1d..6c98228f49 100644 --- a/libfdisk/src/item.c +++ b/libfdisk/src/item.c @@ -1,4 +1,6 @@ +#include + #include "fdiskP.h" /** @@ -219,7 +221,7 @@ static int test_listitems(struct fdisk_test *ts, int argc, char *argv[]) && fdisk_labelitem_get_data_string(item, &str) == 0) printf("%s: %s\n", name, str); else if (fdisk_labelitem_get_data_u64(item, &num) == 0) - printf("%s: %ju\n", name, num); + printf("%s: %"PRIu64"\n", name, num); break; } case 1: /* item unsuported by label -- ignore */