From d04cd6af10688a0f54758e6acb0692bc256e78e9 Mon Sep 17 00:00:00 2001 From: "Carsten Haitzler (Rasterman)" Date: Sun, 12 Feb 2017 14:45:04 +0900 Subject: [PATCH] eina inlist - cast container via void ptr to avoid warnings we really can't do much here but our direct casting causes warnings in apps or anyone using this macro so keep things silent as our pointer tricks are actually ok but the compiler can't figure it out. --- src/lib/eina/eina_inlist.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/eina/eina_inlist.h b/src/lib/eina/eina_inlist.h index 09cec16..243e651 100644 --- a/src/lib/eina/eina_inlist.h +++ b/src/lib/eina/eina_inlist.h @@ -415,7 +415,7 @@ struct _Eina_Inlist #define EINA_INLIST_GET(Inlist) (& ((Inlist)->__in_list)) /** Utility macro to get the container object of an inlist */ #define EINA_INLIST_CONTAINER_GET(ptr, \ - type) ((type *)((char *)ptr - \ + type) ((type *)(void *)((char *)ptr - \ offsetof(type, __in_list))) -- 2.7.4