[CRIU] [V2 2/6] Clang: __unused is illegal varible name for newer version clang
Dmitry Safonov
0x7f454c46 at gmail.com
Tue Apr 2 17:41:49 MSK 2019
On Tue, 2 Apr 2019 at 03:44, <ning.a.zhang at intel.com> wrote:
>
> From: Zhang Ning <ning.a.zhang at intel.com>
>
> with Android P's Clang versoin: 6.0.2, and Android NDK's Clang version 8.0.2
>
> Clang will report below error:
> criu/compel/include/uapi/compel/sigframe-common.h:55:34: error: expected member name or ';' after declaration specifiers
> int __unused[32 - (sizeof (k_rtsigset_t) / sizeof (int))];
> ~~~ ^
>
> it takes __unused as an attribute, not a varible, chang to _unused, pass compile.
>
> Cc: Chen Hu <hu1.chen at intel.com>
> Signed-off-by: Zhang Ning <ning.a.zhang at intel.com>
Reviewed-by: Dmitry Safonov <0x7f454c46 at gmail.com>
> ---
> compel/include/uapi/sigframe-common.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/compel/include/uapi/sigframe-common.h b/compel/include/uapi/sigframe-common.h
> index 0796bb37..e35c8655 100644
> --- a/compel/include/uapi/sigframe-common.h
> +++ b/compel/include/uapi/sigframe-common.h
> @@ -52,7 +52,7 @@ struct rt_ucontext {
> rt_stack_t uc_stack;
> struct rt_sigcontext uc_mcontext;
> k_rtsigset_t uc_sigmask; /* mask last for extensibility */
> - int __unused[32 - (sizeof (k_rtsigset_t) / sizeof (int))];
> + int _unused[32 - (sizeof (k_rtsigset_t) / sizeof (int))];
> unsigned long uc_regspace[128] __attribute__((aligned(8)));
> };
>
> --
> 2.20.1
>
> _______________________________________________
> CRIU mailing list
> CRIU at openvz.org
> https://lists.openvz.org/mailman/listinfo/criu
More information about the CRIU
mailing list