summaryrefslogtreecommitdiff
path: root/bit-radix.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 /bit-radix.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 'bit-radix.c')
-rw-r--r--bit-radix.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/bit-radix.c b/bit-radix.c
index 32ccb3a8..57f6f3c9 100644
--- a/bit-radix.c
+++ b/bit-radix.c
@@ -186,7 +186,7 @@ int find_first_radix_bit(struct radix_tree_root *radix, unsigned long *retbits,
unsigned long slot;
slot = start / BIT_RADIX_BITS_PER_ARRAY;
- ret = radix_tree_gang_lookup(radix, (void **)gang, slot,
+ ret = radix_tree_gang_lookup(radix, (void *)gang, slot,
ARRAY_SIZE(gang));
found = start % BIT_RADIX_BITS_PER_ARRAY;
for (i = 0; i < ret && nr > 0; i++) {