]> sourceware.org Git - lvm2.git/commitdiff
radix-tree: squash a pointer arithmetic warning
authorJoe Thornber <ejt@redhat.com>
Thu, 21 Jun 2018 16:41:56 +0000 (17:41 +0100)
committerJoe Thornber <ejt@redhat.com>
Thu, 21 Jun 2018 16:41:56 +0000 (17:41 +0100)
base/data-struct/radix-tree.c

index ffbf029f7d514537cab9b3716022b6227496b7af..1d24dadf24b3b6ff7808495aa4c2ce86c7fa2eff 100644 (file)
@@ -628,7 +628,7 @@ static void _erase_elt(void *array, unsigned obj_size, unsigned count, unsigned
                 obj_size * (count - index - 1));
 
        // Zero the now unused last elt (set's v.type to UNSET)
-       memset(array + (count - 1) * obj_size, 0, obj_size);
+       memset(((uint8_t *) array) + (count - 1) * obj_size, 0, obj_size);
 }
 
 static bool _remove(struct radix_tree *rt, struct value *root, uint8_t *kb, uint8_t *ke)
This page took 0.03733 seconds and 5 git commands to generate.