1
0
Fork 0
mirror of https://github.com/yshui/picom.git synced 2024-11-18 13:55:36 -05:00

test.h: silence gcc warnings about unused results

This is not perfect, and gcc warnings are often unpredictable (generally
what you don't want warnings to be). But seems to work for now.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
Yuxuan Shui 2024-08-02 17:16:32 +01:00
parent 7094d7a906
commit 6e63489bd8
No known key found for this signature in database
GPG key ID: D3A4405BE6CC17F4

View file

@ -222,12 +222,8 @@ static inline void __attribute__((constructor(102))) run_tests(void) {
#define TEST_CASE(name) static void __attribute__((unused)) __test_h_##name(void)
#define TEST_EQUAL(a, b) \
(void)(a); \
(void)(b)
#define TEST_NOTEQUAL(a, b) \
(void)(a); \
(void)(b)
#define TEST_EQUAL(a, b) (void)((a) == (b))
#define TEST_NOTEQUAL(a, b) (void)((a) != (b))
#define TEST_TRUE(a) (void)(a)
#define TEST_STREQUAL(a, b) \
(void)(a); \