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 --- extent-tree.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'extent-tree.c') diff --git a/extent-tree.c b/extent-tree.c index 79794573..c46c92b9 100644 --- a/extent-tree.c +++ b/extent-tree.c @@ -3090,8 +3090,7 @@ int btrfs_free_block_groups(struct btrfs_fs_info *info) break; ret = get_state_private(&info->block_group_cache, start, &ptr); if (!ret) { - cache = (struct btrfs_block_group_cache *) - (uintptr_t)ptr; + cache = u64_to_ptr(ptr); if (cache->free_space_ctl) { btrfs_remove_free_space_cache(cache); kfree(cache->free_space_ctl); -- cgit v1.2.3