From ec725dc140592f0d3e4fc3e830cfd1edaf5546c0 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tapani=20P=C3=A4lli?= Date: Wed, 9 Nov 2016 08:58:12 +0200 Subject: [PATCH] util: use STATIC_ASSERT instead of static_assert MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 --- src/util/u_vector.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) -- 2.30.2