Btrfs-progs: fix compile warning in btrfs_free_block_groups()
authorWang Shilong <wangsl-fnst@cn.fujitsu.com>
Sat, 18 May 2013 16:54:37 +0000 (00:54 +0800)
committerDavid Sterba <dsterba@suse.cz>
Fri, 9 Aug 2013 12:32:30 +0000 (14:32 +0200)
extent-tree.c: In function 'btrfs_free_block_groups':
extent-tree.c:3190:12: warning: cast to pointer from integer of
 different size [-Wint-to-pointer-cast]

Signed-off-by: Wang Shilong <wangsl-fnst@cn.fujitsu.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
extent-tree.c

index e488390..a89f525 100644 (file)
@@ -18,6 +18,7 @@
 
 #include <stdio.h>
 #include <stdlib.h>
+#include <stdint.h>
 #include "kerncompat.h"
 #include "radix-tree.h"
 #include "ctree.h"
@@ -3103,7 +3104,8 @@ 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 *)ptr;
+                       cache = (struct btrfs_block_group_cache *)
+                                       (uintptr_t)ptr;
                        if (cache->free_space_ctl) {
                                btrfs_remove_free_space_cache(cache);
                                kfree(cache->free_space_ctl);