<div dir="auto"><div><div class="gmail_extra"><br><div class="gmail_quote">On Oct 1, 2017 9:19 PM, "Andrei Vagin" <<a href="mailto:avagin@virtuozzo.com">avagin@virtuozzo.com</a>> wrote:<br type="attribution"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="elided-text">On Sun, Oct 01, 2017 at 05:34:02PM -0700, Kir Kolyshkin wrote:<br>
> With clang 4, the following error appears:<br>
><br>
> > CC criu/pie/parasite.o<br>
> > In file included from criu/pie/parasite.c:23:<br>
> > criu/arch/arm/include/asm/<wbr>parasite.h:6:21: error: this function<br>
> > declaration is not a<br>
> > prototype [-Werror,-Wstrict-prototypes]<br>
> > *ptls = ((tls_t (*)())0xffff0fe0)();<br>
> > ^<br>
> > void<br>
> > 1 error generated.<br>
><br>
> Apparently, adding void fixes it.<br>
><br>
> Signed-off-by: Kir Kolyshkin <<a href="mailto:kolyshkin@gmail.com">kolyshkin@gmail.com</a>><br>
> ---<br>
> criu/arch/arm/include/asm/<wbr>parasite.h | 2 +-<br>
> 1 file changed, 1 insertion(+), 1 deletion(-)<br>
><br>
> diff --git a/criu/arch/arm/include/asm/<wbr>parasite.h b/criu/arch/arm/include/asm/<wbr>parasite.h<br>
> index 7f62bb9d..0ed320ba 100644<br>
> --- a/criu/arch/arm/include/asm/<wbr>parasite.h<br>
> +++ b/criu/arch/arm/include/asm/<wbr>parasite.h<br>
> @@ -3,7 +3,7 @@<br>
><br>
> static inline void arch_get_tls(tls_t *ptls)<br>
> {<br>
> - *ptls = ((tls_t (*)())0xffff0fe0)();<br>
> + *ptls = ((tls_t (*)(void))0xffff0fe0)();<br>
<br>
</div>do you mean void * ^^^^<br></blockquote></div></div></div><div dir="auto"><br></div><div dir="auto"><br></div><div dir="auto"><span style="font-family:sans-serif">No, what you see is a cast from a pointer to a function (followed by a call to it). Here void is that function argument.</span><br style="font-family:sans-serif"><br></div><div dir="auto"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
> }<br>
><br>
> #endif<br>
<font color="#888888">> --<br>
> 2.14.1<br>
><br>
</font></blockquote></div><br></div></div></div>