summaryrefslogtreecommitdiff
path: root/extent-tree.c
diff options
context:
space:
mode:
authorJan Engelhardt <jengelh@computergmbh.de>2007-09-14 10:31:06 -0400
committerDavid Woodhouse <dwmw2@hera.kernel.org>2007-09-14 10:31:06 -0400
commitddcaa0171a677a76078c6e0ad54c2f8033110a6f (patch)
tree2762ad4ae379ba32cd5e3316e501e05dc2392e4e /extent-tree.c
parent8454d619a7f6966f65f17c2a727e07ae3667b631 (diff)
Make btrfs-progs compile with -fstrict-aliasing (included in -O2) again.
This is done by doing a two-step conversion (rather than a one-step). First, the variable goes from type * to void *, and then to implicitly to void **. (Not sure if this is "good practice", but it shuts up the compiler, so it seems the compiler takes into account that we are actually punning it this way.)
Diffstat (limited to 'extent-tree.c')
-rw-r--r--extent-tree.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/extent-tree.c b/extent-tree.c
index 8b91df53..2c53192f 100644
--- a/extent-tree.c
+++ b/extent-tree.c
@@ -164,7 +164,7 @@ int btrfs_write_dirty_block_groups(struct btrfs_trans_handle *trans,
btrfs_init_path(&path);
while(1) {
- ret = radix_tree_gang_lookup_tag(radix, (void **)cache,
+ ret = radix_tree_gang_lookup_tag(radix, (void *)cache,
0, ARRAY_SIZE(cache),
BTRFS_BLOCK_GROUP_DIRTY);
if (!ret)
@@ -195,7 +195,7 @@ static int update_block_group(struct btrfs_trans_handle *trans,
while(total) {
ret = radix_tree_gang_lookup(&info->block_group_radix,
- (void **)&cache, blocknr, 1);
+ (void *)&cache, blocknr, 1);
if (!ret)
return -1;
radix_tree_tag_set(&info->block_group_radix,
@@ -229,7 +229,7 @@ int btrfs_finish_extent_commit(struct btrfs_trans_handle *trans, struct
while(1) {
ret = radix_tree_gang_lookup(&root->fs_info->pinned_radix,
- (void **)gang, 0,
+ (void *)gang, 0,
ARRAY_SIZE(gang));
if (!ret)
break;
@@ -362,7 +362,7 @@ static int del_pending_extents(struct btrfs_trans_handle *trans, struct
while(1) {
ret = radix_tree_gang_lookup_tag(
&extent_root->fs_info->cache_radix,
- (void **)gang, 0,
+ (void *)gang, 0,
ARRAY_SIZE(gang),
CTREE_EXTENT_PENDING_DEL);
if (!ret)
@@ -738,7 +738,7 @@ int btrfs_free_block_groups(struct btrfs_fs_info *info)
while(1) {
ret = radix_tree_gang_lookup(&info->block_group_radix,
- (void **)cache, 0,
+ (void *)cache, 0,
ARRAY_SIZE(cache));
if (!ret)
break;