aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEric Engestrom <[email protected]>2019-10-28 23:47:48 +0000
committerEric Engestrom <[email protected]>2019-12-27 22:09:00 +0000
commit51569e525afc5e7173f12b0a3f1ba0e92425407f (patch)
treee7afe9c606a24da1195ddcf1a5967a8d7d34fa8b /src
parent7a4a75a1852953b25738a47df6f25eed015c5f18 (diff)
amd: fix empty-body issues
Signed-off-by: Eric Engestrom <[email protected]> Fixes: 8d43e2b2ded0fe3c82d4 ("meson: add -Werror=empty-body to disallow `if(x);`") Reviewed-By: Timur Kristóf <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/amd/addrlib/src/core/addrcommon.h12
-rw-r--r--src/amd/common/ac_debug.c2
-rw-r--r--src/amd/compiler/aco_ir.h2
-rw-r--r--src/amd/vulkan/radv_private.h2
4 files changed, 9 insertions, 9 deletions
diff --git a/src/amd/addrlib/src/core/addrcommon.h b/src/amd/addrlib/src/core/addrcommon.h
index 4c919678804..f2f8c6a0385 100644
--- a/src/amd/addrlib/src/core/addrcommon.h
+++ b/src/amd/addrlib/src/core/addrcommon.h
@@ -68,7 +68,7 @@
#define ADDR_DBG_BREAK() { __debugbreak(); }
#endif
#else
- #define ADDR_DBG_BREAK()
+ #define ADDR_DBG_BREAK() do {} while(0)
#endif
////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -147,15 +147,15 @@
#define ADDRDPF 1 ? (void)0 : (void)
-#define ADDR_PRNT(a)
+#define ADDR_PRNT(a) do {} while(0)
-#define ADDR_DBG_BREAK()
+#define ADDR_DBG_BREAK() do {} while(0)
-#define ADDR_INFO(cond, a)
+#define ADDR_INFO(cond, a) do {} while(0)
-#define ADDR_WARN(cond, a)
+#define ADDR_WARN(cond, a) do {} while(0)
-#define ADDR_EXIT(cond, a)
+#define ADDR_EXIT(cond, a) do {} while(0)
#endif // DEBUG
////////////////////////////////////////////////////////////////////////////////////////////////////
diff --git a/src/amd/common/ac_debug.c b/src/amd/common/ac_debug.c
index 36a01fd8bf7..77c0e0aa790 100644
--- a/src/amd/common/ac_debug.c
+++ b/src/amd/common/ac_debug.c
@@ -28,7 +28,7 @@
#include <memcheck.h>
#define VG(x) x
#else
-#define VG(x)
+#define VG(x) ((void)0)
#endif
#include <inttypes.h>
diff --git a/src/amd/compiler/aco_ir.h b/src/amd/compiler/aco_ir.h
index bc71a95641a..82309ba8e38 100644
--- a/src/amd/compiler/aco_ir.h
+++ b/src/amd/compiler/aco_ir.h
@@ -1240,7 +1240,7 @@ bool validate_ra(Program* program, const struct radv_nir_compiler_options *optio
#ifndef NDEBUG
void perfwarn(bool cond, const char *msg, Instruction *instr=NULL);
#else
-#define perfwarn(program, cond, msg, ...)
+#define perfwarn(program, cond, msg, ...) do {} while(0)
#endif
void aco_print_instr(Instruction *instr, FILE *output);
diff --git a/src/amd/vulkan/radv_private.h b/src/amd/vulkan/radv_private.h
index 1be61679d8a..01a2533b33e 100644
--- a/src/amd/vulkan/radv_private.h
+++ b/src/amd/vulkan/radv_private.h
@@ -270,7 +270,7 @@ void radv_logi_v(const char *format, va_list va);
fprintf(stderr, "%s:%d ASSERT: %s\n", __FILE__, __LINE__, #x); \
})
#else
-#define radv_assert(x)
+#define radv_assert(x) do {} while(0)
#endif
#define stub_return(v) \