From: Carsten Haitzler (Rasterman) Date: Sun, 12 Feb 2017 05:45:04 +0000 (+0900) Subject: eina inlist - cast container via void ptr to avoid warnings X-Git-Tag: upstream/1.20.0~2047 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d04cd6af10688a0f54758e6acb0692bc256e78e9;p=platform%2Fupstream%2Fefl.git 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. --- 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)))