From 8348086b48af0cbabe4cf2b64992ced6561ea50c Mon Sep 17 00:00:00 2001 From: David Oberhollenzer Date: Thu, 24 Jun 2021 16:07:45 +0200 Subject: Remove casual un-const casting in various places Signed-off-by: David Oberhollenzer --- include/sqfs/predef.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/sqfs/predef.h b/include/sqfs/predef.h index 8a456d8..6296b4b 100644 --- a/include/sqfs/predef.h +++ b/include/sqfs/predef.h @@ -152,8 +152,10 @@ 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((sqfs_object_t *)obj); + if (((const sqfs_object_t *)obj)->copy != NULL) { + return ((const sqfs_object_t *)obj)-> + copy((const sqfs_object_t *)obj); + } return NULL; } -- cgit v1.2.3