OSDN Git Service

vulkan: use STATIC_ASSERT instead of static_assert
authorEdward O'Callaghan <funfunctor@folklore1984.net>
Tue, 6 Dec 2016 23:30:48 +0000 (10:30 +1100)
committerEdward O'Callaghan <funfunctor@folklore1984.net>
Wed, 7 Dec 2016 11:32:38 +0000 (22:32 +1100)
Following the spirit of commit 23d1799f, fixes compilation
warnings on Android build due to lack of C11 features.

Signed-off-by: Edward O'Callaghan <funfunctor@folklore1984.net>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
src/amd/vulkan/radv_private.h
src/vulkan/wsi/wsi_common_wayland.c
src/vulkan/wsi/wsi_common_x11.c

index def0af2..4b72017 100644 (file)
@@ -173,7 +173,7 @@ radv_clear_mask(uint32_t *inout_mask, uint32_t clear_mask)
             __dword &= ~(1 << (b)))
 
 #define typed_memcpy(dest, src, count) ({                              \
-                       static_assert(sizeof(*src) == sizeof(*dest), ""); \
+                       STATIC_ASSERT(sizeof(*src) == sizeof(*dest)); \
                        memcpy((dest), (src), (count) * sizeof(*(src))); \
                })
 
index f6c218b..2fe889e 100644 (file)
@@ -38,7 +38,7 @@
 #include <util/u_vector.h>
 
 #define typed_memcpy(dest, src, count) ({ \
-   static_assert(sizeof(*src) == sizeof(*dest), ""); \
+   STATIC_ASSERT(sizeof(*src) == sizeof(*dest)); \
    memcpy((dest), (src), (count) * sizeof(*(src))); \
 })
 
index 56398ce..25ba0c1 100644 (file)
@@ -42,7 +42,7 @@
 #include "wsi_common_queue.h"
 
 #define typed_memcpy(dest, src, count) ({ \
-   static_assert(sizeof(*src) == sizeof(*dest), ""); \
+   STATIC_ASSERT(sizeof(*src) == sizeof(*dest)); \
    memcpy((dest), (src), (count) * sizeof(*(src))); \
 })