From: Michał 'Khorne' Lowas-Rzechonek <michal(a)rzechonek.net>
This fixes build failures when building with -Wcast-align -Werror on
some platforms (most notably: 32bit ARM).
---
ell/util.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ell/util.h b/ell/util.h
index 4f20ef0..fe7c7e2 100644
--- a/ell/util.h
+++ b/ell/util.h
@@ -37,7 +37,7 @@ extern "C" {
#define l_container_of(ptr, type, member) ({ \
const __typeof__(((type *) 0)->member) *__mptr = (ptr); \
- (type *)((char *) __mptr - offsetof(type, member)); \
+ (type *)(void *)((char *) __mptr - offsetof(type, member)); \
})
#define likely(x) __builtin_expect(!!(x), 1)
--
2.22.0
Show replies by date