[01/10] Silence clang-4 warning about unaligned pointer

Submitted by Kirill Kolyshkin on Oct. 2, 2017, 12:33 a.m.

Details

Message ID 20171002003405.21717-2-kolyshkin@gmail.com
State New
Headers show

Patch hide | download patch | download mbox

diff --git a/compel/arch/x86/src/lib/include/uapi/asm/sigframe.h b/compel/arch/x86/src/lib/include/uapi/asm/sigframe.h
index 2b51c366..3260d9c1 100644
--- a/compel/arch/x86/src/lib/include/uapi/asm/sigframe.h
+++ b/compel/arch/x86/src/lib/include/uapi/asm/sigframe.h
@@ -130,7 +130,7 @@  struct rt_sigframe {
 #define RT_SIGFRAME_UC_SIGMASK(rt_sigframe)				\
 	((rt_sigframe->is_native)			?		\
 	(&rt_sigframe->native.uc.uc_sigmask) :				\
-	(&rt_sigframe->compat.uc.uc_sigmask))
+	((k_rtsigset_t *)(void *)&rt_sigframe->compat.uc.uc_sigmask))
 
 #define RT_SIGFRAME_REGIP(rt_sigframe)					\
 	((rt_sigframe->is_native)			?		\
diff --git a/compel/src/lib/infect.c b/compel/src/lib/infect.c
index 07200a7a..9ebc5b5a 100644
--- a/compel/src/lib/infect.c
+++ b/compel/src/lib/infect.c
@@ -1126,7 +1126,7 @@  static int save_regs_plain(void *to, user_regs_struct_t *r, user_fpregs_struct_t
 
 #ifndef RT_SIGFRAME_UC_SIGMASK
 #define RT_SIGFRAME_UC_SIGMASK(sigframe)				\
-	(k_rtsigset_t*)&RT_SIGFRAME_UC(sigframe)->uc_sigmask
+	(k_rtsigset_t*)(void *)&RT_SIGFRAME_UC(sigframe)->uc_sigmask
 #endif
 
 static int make_sigframe_plain(void *from, struct rt_sigframe *f, struct rt_sigframe *rtf, k_rtsigset_t *b)