diff --git a/test/tarantool-c-tests/fix-yield-c-hook.test.c b/test/tarantool-c-tests/fix-yield-c-hook.test.c index 0e9fa5d6bd..aff4a37175 100644 --- a/test/tarantool-c-tests/fix-yield-c-hook.test.c +++ b/test/tarantool-c-tests/fix-yield-c-hook.test.c @@ -3,8 +3,6 @@ #include "test.h" #include "utils.h" -#define UNUSED(x) ((void)(x)) - /* * This test demonstrates LuaJIT's incorrect behaviour, when * calling `lua_yield()` inside a C hook. diff --git a/test/tarantool-c-tests/gh-8594-sysprof-ffunc-crash.test.c b/test/tarantool-c-tests/gh-8594-sysprof-ffunc-crash.test.c index 769d333a87..2550f43c26 100644 --- a/test/tarantool-c-tests/gh-8594-sysprof-ffunc-crash.test.c +++ b/test/tarantool-c-tests/gh-8594-sysprof-ffunc-crash.test.c @@ -46,8 +46,6 @@ * * https://github.com/tarantool/tarantool/issues/9387 */ -#define UNUSED(x) ((void)(x)) - #define MESSAGE "Canary is alive" #define LUACALL "local a = tostring('" MESSAGE "') return a" diff --git a/test/tarantool-c-tests/lj-1168-unmarked-finalizer-tab.test.c b/test/tarantool-c-tests/lj-1168-unmarked-finalizer-tab.test.c index 9e57efb853..2d54da8902 100644 --- a/test/tarantool-c-tests/lj-1168-unmarked-finalizer-tab.test.c +++ b/test/tarantool-c-tests/lj-1168-unmarked-finalizer-tab.test.c @@ -3,8 +3,6 @@ #include "test.h" -#define UNUSED(x) ((void)(x)) - /* * This test demonstrates LuaJIT's incorrect behaviour on * loading Lua chunk with cdata numbers. diff --git a/test/tarantool-c-tests/lj-549-lua-load.test.c b/test/tarantool-c-tests/lj-549-lua-load.test.c index 42a14be5bc..b0e94f6fe7 100644 --- a/test/tarantool-c-tests/lj-549-lua-load.test.c +++ b/test/tarantool-c-tests/lj-549-lua-load.test.c @@ -3,8 +3,6 @@ #include "lj_def.h" -#define UNUSED(x) ((void)(x)) - /* * XXX: In C language, objects with static storage duration have * to be initialized with constant expressions or with aggregate diff --git a/test/tarantool-c-tests/misclib-sysprof-capi.test.c b/test/tarantool-c-tests/misclib-sysprof-capi.test.c index 21e40d22d1..f0dc44057e 100644 --- a/test/tarantool-c-tests/misclib-sysprof-capi.test.c +++ b/test/tarantool-c-tests/misclib-sysprof-capi.test.c @@ -18,8 +18,6 @@ /* Need for skipcond for OS and ARCH. */ #include "lj_arch.h" -#define UNUSED(x) ((void)(x)) - /* --- utils -------------------------------------------------- */ #define SYSPROF_INTERVAL_DEFAULT 100 diff --git a/test/tarantool-c-tests/test.h b/test/tarantool-c-tests/test.h index 3b22fb9285..d5966e4047 100644 --- a/test/tarantool-c-tests/test.h +++ b/test/tarantool-c-tests/test.h @@ -4,6 +4,10 @@ #include #include +#ifndef UNUSED +#define UNUSED(x) ((void)(x)) +#endif + /* * Test module, based on TAP 14 specification [1]. * [1]: https://testanything.org/tap-version-14-specification.html diff --git a/test/tarantool-c-tests/unit-tap.test.c b/test/tarantool-c-tests/unit-tap.test.c index ca0709ca94..1f9a37ef5a 100644 --- a/test/tarantool-c-tests/unit-tap.test.c +++ b/test/tarantool-c-tests/unit-tap.test.c @@ -1,7 +1,5 @@ #include "test.h" -#define UNUSED(x) ((void)(x)) - static int test_ok(void *test_state) { UNUSED(test_state);