From f708f67a4d0a2465376b9b7e2a84b71e195172e4 Mon Sep 17 00:00:00 2001 From: Stewart Smith Date: Tue, 29 May 2018 14:18:43 +1000 Subject: hdata/tests/stubs.c: fix GCC8 warning MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit hdata/test/stubs.c:112:11: error: ‘lock_caller’ alias between functions of incompatible types ‘void(void)’ and ‘_Bool(void)’ [-Werror=attribute-alias] NOOP_STUB(lock_caller); ^~~~~~~~~~~ We fix it by giving the correct prototype to our stub Signed-off-by: Stewart Smith --- hdata/test/stubs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'hdata/test') diff --git a/hdata/test/stubs.c b/hdata/test/stubs.c index 92098bf..5922570 100644 --- a/hdata/test/stubs.c +++ b/hdata/test/stubs.c @@ -103,9 +103,9 @@ static bool true_stub(void) { return true; } static bool false_stub(void) { return false; } #define TRUE_STUB(fnname) \ - void fnname(void) __attribute__((weak, alias ("true_stub"))) + bool fnname(void) __attribute__((weak, alias ("true_stub"))) #define FALSE_STUB(fnname) \ - void fnname(void) __attribute__((weak, alias ("false_stub"))) + bool fnname(void) __attribute__((weak, alias ("false_stub"))) #define NOOP_STUB FALSE_STUB TRUE_STUB(lock_held_by_me); -- cgit v1.1