From: Tapani Pälli Date: Wed, 9 Nov 2016 06:58:12 +0000 (+0200) Subject: util: use STATIC_ASSERT instead of static_assert X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ec725dc140592f0d3e4fc3e830cfd1edaf5546c0;p=mesa.git util: use STATIC_ASSERT instead of static_assert fixes following compilation warnings on Android build: "warning: implicit declaration of function 'static_assert' is invalid in C99 [-Wimplicit-function-declaration]" Signed-off-by: Tapani Pälli Reviewed-by: Emil Velikov Reviewed-by: Jason Ekstrand --- diff --git a/src/util/u_vector.h b/src/util/u_vector.h index 8fa4ec483c9..f97a8b43cae 100644 --- a/src/util/u_vector.h +++ b/src/util/u_vector.h @@ -82,7 +82,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 *), ""); \ + 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; \ __u_vector_offset += (queue)->element_size)