eina inlist - cast container via void ptr to avoid warnings
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>
Sun, 12 Feb 2017 05:45:04 +0000 (14:45 +0900)
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>
Sun, 12 Feb 2017 05:45:04 +0000 (14:45 +0900)
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

index 09cec16..243e651 100644 (file)
@@ -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)))