* [PATCH RESEND] Btrfs-progs: fix compile warning in btrfs_free_block_groups()
@ 2013-07-03 16:24 Wang Shilong
2013-07-03 16:31 ` Stefan Behrens
0 siblings, 1 reply; 2+ messages in thread
From: Wang Shilong @ 2013-07-03 16:24 UTC (permalink / raw)
To: linux-btrfs; +Cc: wangsl-fnst
From: Wang Shilong <wangsl-fnst@cn.fujitsu.com>
extent-tree.c: In function 'btrfs_free_block_groups':
extent-tree.c:3189:12: warning: cast to pointer from
integer of different size [-Wint-to-pointer-cast]
Signed-off-by: Wang Shilong <wangsl-fnst@cn.fujitsu.com>
---
extent-tree.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/extent-tree.c b/extent-tree.c
index b0cfe0a..7561bbb 100644
--- a/extent-tree.c
+++ b/extent-tree.c
@@ -3186,7 +3186,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 *)
+ (unsigned long)ptr;
if (cache->free_space_ctl) {
btrfs_remove_free_space_cache(cache);
kfree(cache->free_space_ctl);
--
1.7.11.7
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH RESEND] Btrfs-progs: fix compile warning in btrfs_free_block_groups()
2013-07-03 16:24 [PATCH RESEND] Btrfs-progs: fix compile warning in btrfs_free_block_groups() Wang Shilong
@ 2013-07-03 16:31 ` Stefan Behrens
0 siblings, 0 replies; 2+ messages in thread
From: Stefan Behrens @ 2013-07-03 16:31 UTC (permalink / raw)
To: Wang Shilong; +Cc: linux-btrfs, wangsl-fnst
On Thu, 4 Jul 2013 00:24:45 +0800, Wang Shilong wrote:
> From: Wang Shilong <wangsl-fnst@cn.fujitsu.com>
>
> extent-tree.c: In function 'btrfs_free_block_groups':
> extent-tree.c:3189:12: warning: cast to pointer from
> integer of different size [-Wint-to-pointer-cast]
>
> Signed-off-by: Wang Shilong <wangsl-fnst@cn.fujitsu.com>
> ---
> extent-tree.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/extent-tree.c b/extent-tree.c
> index b0cfe0a..7561bbb 100644
> --- a/extent-tree.c
> +++ b/extent-tree.c
> @@ -3186,7 +3186,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 *)
> + (unsigned long)ptr;
Shouldn't this be "(uintptr_t)" instead of "(unsigned long)"?
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-07-03 16:31 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-03 16:24 [PATCH RESEND] Btrfs-progs: fix compile warning in btrfs_free_block_groups() Wang Shilong
2013-07-03 16:31 ` Stefan Behrens
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).