[V4,2/5] Clang: __unused is illegal varible name for newer version clang

Submitted by Zhang, Ning A on April 9, 2019, 1:20 a.m.

Details

Message ID 20190409012100.12683-3-ning.a.zhang@intel.com
State Accepted
Series "patches for build with Android NDK"
Headers show

Commit Message

Zhang, Ning A April 9, 2019, 1:20 a.m.
From: Zhang Ning <ning.a.zhang@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@intel.com>
Signed-off-by: Zhang Ning <ning.a.zhang@intel.com>
Reviewed-by: Dmitry Safonov <0x7f454c46@gmail.com>
---
 compel/include/uapi/sigframe-common.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch hide | download patch | download mbox

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