From 943dc3fa216913bff7e2dd267a9f52f082c04663 Mon Sep 17 00:00:00 2001 From: David Oberhollenzer Date: Thu, 16 Apr 2020 02:03:58 +0200 Subject: Propperly cast void pointer in sqfs_object_t inline function Otherwise, C++ compilers will scream. Signed-off-by: David Oberhollenzer --- include/sqfs/predef.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include/sqfs') diff --git a/include/sqfs/predef.h b/include/sqfs/predef.h index 0e81933..e0afac4 100644 --- a/include/sqfs/predef.h +++ b/include/sqfs/predef.h @@ -134,7 +134,7 @@ typedef struct sqfs_object_t { */ static SQFS_INLINE void sqfs_destroy(void *obj) { - ((sqfs_object_t *)obj)->destroy(obj); + ((sqfs_object_t *)obj)->destroy((sqfs_object_t *)obj); } /** @@ -150,7 +150,7 @@ static SQFS_INLINE void sqfs_destroy(void *obj) static SQFS_INLINE void *sqfs_copy(const void *obj) { if (((sqfs_object_t *)obj)->copy != NULL) - return ((sqfs_object_t *)obj)->copy(obj); + return ((sqfs_object_t *)obj)->copy((sqfs_object_t *)obj); return NULL; } -- cgit v1.2.3