[CRIU] [PATCH 07/10] Fix armv7 compile with clang 4

Andrei Vagin avagin at virtuozzo.com
Mon Oct 2 07:19:20 MSK 2017


On Sun, Oct 01, 2017 at 05:34:02PM -0700, Kir Kolyshkin wrote:
> With clang 4, the following error appears:
> 
> >   CC       criu/pie/parasite.o
> > In file included from criu/pie/parasite.c:23:
> > criu/arch/arm/include/asm/parasite.h:6:21: error: this function
> > declaration is not a
> >       prototype [-Werror,-Wstrict-prototypes]
> >         *ptls = ((tls_t (*)())0xffff0fe0)();
> >                            ^
> >                             void
> > 1 error generated.
> 
> Apparently, adding void fixes it.
> 
> Signed-off-by: Kir Kolyshkin <kolyshkin at gmail.com>
> ---
>  criu/arch/arm/include/asm/parasite.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/criu/arch/arm/include/asm/parasite.h b/criu/arch/arm/include/asm/parasite.h
> index 7f62bb9d..0ed320ba 100644
> --- a/criu/arch/arm/include/asm/parasite.h
> +++ b/criu/arch/arm/include/asm/parasite.h
> @@ -3,7 +3,7 @@
>  
>  static inline void arch_get_tls(tls_t *ptls)
>  {
> -	*ptls = ((tls_t (*)())0xffff0fe0)();
> +	*ptls = ((tls_t (*)(void))0xffff0fe0)();

do you mean void *          ^^^^
>  }
>  
>  #endif
> -- 
> 2.14.1
> 


More information about the CRIU mailing list