From 84ebfa6d88fb9bfe10b26be03cf4982973b4fa17 Mon Sep 17 00:00:00 2001 From: Wang Shilong Date: Sun, 27 Jul 2014 00:49:55 +0800 Subject: Btrfs-progs: fix some build warnings on 32bit platform Fix following build warnings on 32bit platform: ... utils.c:1708:3: warning: left shift count >= width of type [enabled by default] if (x << i & (1UL << 63)) ^ qgroup-verify.c:393:9: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] return (struct tree_block *)unode->aux; ^ qgroup-verify.c:407:38: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] if (ulist_add(tree_blocks, bytenr, (unsigned long long)block, 0) >= 0) ^ cmds-restore.c:120:4: warning: format %lu expects argument of type long unsigned int, but argument 3 has type size_t [-Wformat=] fprintf(stderr, "bad compress length %lu\n", in_len); ... BTW, this patch also switches other castings with new helpers. Signed-off-by: Wang Shilong Signed-off-by: David Sterba --- cmds-inspect.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'cmds-inspect.c') diff --git a/cmds-inspect.c b/cmds-inspect.c index cd9d2c6..c6c17a5 100644 --- a/cmds-inspect.c +++ b/cmds-inspect.c @@ -49,7 +49,7 @@ static int __ino_to_path_fd(u64 inum, int fd, int verbose, const char *prepend) memset(fspath, 0, sizeof(*fspath)); ipa.inum = inum; ipa.size = 4096; - ipa.fspath = (uintptr_t)fspath; + ipa.fspath = ptr_to_u64(fspath); ret = ioctl(fd, BTRFS_IOC_INO_PATHS, &ipa); if (ret) { @@ -185,7 +185,7 @@ static int cmd_logical_resolve(int argc, char **argv) memset(inodes, 0, sizeof(*inodes)); loi.logical = arg_strtou64(argv[optind]); loi.size = size; - loi.inodes = (uintptr_t)inodes; + loi.inodes = ptr_to_u64(inodes); fd = open_file_or_dir(argv[optind+1], &dirstream); if (fd < 0) { -- cgit v1.2.1