path: root/radix-tree.c
diff options
authorJan Engelhardt <>2007-09-14 10:31:06 -0400
committerDavid Woodhouse <>2007-09-14 10:31:06 -0400
commitddcaa0171a677a76078c6e0ad54c2f8033110a6f (patch)
tree2762ad4ae379ba32cd5e3316e501e05dc2392e4e /radix-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 'radix-tree.c')
1 files changed, 1 insertions, 1 deletions
diff --git a/radix-tree.c b/radix-tree.c
index abb754e6..ed01810a 100644
--- a/radix-tree.c
+++ b/radix-tree.c
@@ -314,7 +314,7 @@ static inline void **__lookup_slot(struct radix_tree_root *root,
return NULL;
if (height == 0 && root->rnode)
- return (void **)&root->rnode;
+ return (void *)&root->rnode;
shift = (height-1) * RADIX_TREE_MAP_SHIFT;
slot = &root->rnode;