summaryrefslogtreecommitdiffstats
path: root/src/util
diff options
context:
space:
mode:
authorTapani Pälli <[email protected]>2016-11-09 08:58:12 +0200
committerTapani Pälli <[email protected]>2016-11-11 07:59:29 +0200
commitec725dc140592f0d3e4fc3e830cfd1edaf5546c0 (patch)
treeb4fb6c38c1194c3885939b628c748d1230c171b0 /src/util
parent98969808ffbb12538b98ce6d927c1527d196caa9 (diff)
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 <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/util')
-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 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)