summaryrefslogtreecommitdiffstats
path: root/src/util/u_vector.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/util/u_vector.h')
-rw-r--r--src/util/u_vector.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/util/u_vector.h b/src/util/u_vector.h
index c7fcb37a052..c0e199cfa5a 100644
--- a/src/util/u_vector.h
+++ b/src/util/u_vector.h
@@ -84,7 +84,7 @@ u_vector_finish(struct u_vector *queue)
#define u_vector_foreach(elem, queue) \
STATIC_ASSERT(__builtin_types_compatible_p(__typeof__(queue), struct u_vector *)); \
for (uint32_t __u_vector_offset = (queue)->tail; \
- elem = (queue)->data + (__u_vector_offset & ((queue)->size - 1)), __u_vector_offset < (queue)->head; \
+ elem = (void *)((char *)(queue)->data + (__u_vector_offset & ((queue)->size - 1))), __u_vector_offset < (queue)->head; \
__u_vector_offset += (queue)->element_size)