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

Laurent Dufour ldufour at linux.vnet.ibm.com
Thu Oct 27 01:02:19 PDT 2016


On 26/10/2016 07:08, Kir Kolyshkin wrote:
> 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").

Acked-by: Laurent Dufour <ldufour at linux.vnet.ibm.com>

> 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)));
> 
	



More information about the CRIU mailing list