[CRIU] [PATCH 1/4] ppc64/crtools.c: fix compilation with clang

Kir Kolyshkin kir at openvz.org
Tue Oct 25 22:08:29 PDT 2016


For gcc, having "inline" is enough to suppress the "unused function"
warning. For clang, we have to do better than that.

See also: commit 4241078 ("zdtm: compile fix for clang") and
commit 3ea2fd7 ("crtools.c: fix compilation by clang").

Signed-off-by: Kir Kolyshkin <kir at openvz.org>
---
 criu/arch/ppc64/crtools.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/criu/arch/ppc64/crtools.c b/criu/arch/ppc64/crtools.c
index 9f4cace..bac1956 100644
--- a/criu/arch/ppc64/crtools.c
+++ b/criu/arch/ppc64/crtools.c
@@ -47,7 +47,7 @@ const u32 code_syscall[] = {
 	0x0fe00000		/* twi 31,0,0	*/
 };
 
-static inline void __check_code_syscall(void)
+static inline void __always_unused __check_code_syscall(void)
 {
 	BUILD_BUG_ON(sizeof(code_syscall) != BUILTIN_SYSCALL_SIZE);
 	BUILD_BUG_ON(!is_log2(sizeof(code_syscall)));
-- 
2.7.4



More information about the CRIU mailing list