From 5f3d5a1263a47213a47dcaeea4e7e9d47c202246 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B3zef=20Kucia?= Date: Mon, 10 Oct 2016 11:22:50 +0200 Subject: [PATCH] tests: Include vkd3d_common.h in vkd3d_test.h. --- include/private/vkd3d_common.h | 8 ++++++++ include/private/vkd3d_debug.h | 6 ------ include/private/vkd3d_test.h | 10 ++-------- tests/d3d12.c | 2 -- 4 files changed, 10 insertions(+), 16 deletions(-) diff --git a/include/private/vkd3d_common.h b/include/private/vkd3d_common.h index 472492a8..ffdc83d3 100644 --- a/include/private/vkd3d_common.h +++ b/include/private/vkd3d_common.h @@ -28,6 +28,14 @@ #define ARRAY_SIZE(x) (sizeof(x) / sizeof(*(x))) +#ifdef __GNUC__ +# define VKD3D_PRINTF_FUNC(fmt, args) __attribute__((format(printf, fmt, args))) +# define VKD3D_UNUSED __attribute__((unused)) +#else +# define VKD3D_PRINTF_FUNC(fmt, args) +# define VKD3D_UNUSED +#endif /* __GNUC__ */ + #ifndef _WIN32 # if HAVE_SYNC_ADD_AND_FETCH static inline ULONG InterlockedIncrement(ULONG volatile *x) diff --git a/include/private/vkd3d_debug.h b/include/private/vkd3d_debug.h index 132cd990..0ce5fb73 100644 --- a/include/private/vkd3d_debug.h +++ b/include/private/vkd3d_debug.h @@ -25,12 +25,6 @@ #include "vkd3d_common.h" -#ifdef __GNUC__ -# define VKD3D_PRINTF_FUNC(fmt, args) __attribute__((format(printf, fmt, args))) -#else -# define VKD3D_PRINTF_FUNC(fmt, args) -#endif /* __GNUC__ */ - enum vkd3d_dbg_level { VKD3D_DBG_LEVEL_NONE, diff --git a/include/private/vkd3d_test.h b/include/private/vkd3d_test.h index 55ec033b..4651bdc1 100644 --- a/include/private/vkd3d_test.h +++ b/include/private/vkd3d_test.h @@ -29,20 +29,14 @@ #include #include +#include "vkd3d_common.h" + static void vkd3d_test_main(void); static const char *vkd3d_test_name; #define START_TEST(name) static const char *vkd3d_test_name = #name; \ static void vkd3d_test_main(void) -#ifdef __GNUC__ -# define VKD3D_PRINTF_FUNC(fmt, args) __attribute__((format(printf, fmt, args))) -# define VKD3D_UNUSED __attribute__((unused)) -#else -# define VKD3D_PRINTF_FUNC(fmt, args) -# define VKD3D_UNUSED -#endif /* __GNUC__ */ - #define ok ok_(__LINE__) #define todo todo_(__LINE__) #define skip skip_(__LINE__) diff --git a/tests/d3d12.c b/tests/d3d12.c index 3cf390d9..b6a71684 100644 --- a/tests/d3d12.c +++ b/tests/d3d12.c @@ -55,8 +55,6 @@ typedef int HRESULT; # include "vkd3d_utils.h" #endif -#define ARRAY_SIZE(x) (sizeof(x) / sizeof(*x)) - static size_t align(size_t addr, unsigned int alignment) { return (addr + (alignment - 1)) & ~(alignment - 1);