From 49ba5ed88198c26be3e0429e155824a246d3d555 Mon Sep 17 00:00:00 2001 From: hyung-hwan Date: Sat, 13 Apr 2019 01:02:20 +0000 Subject: [PATCH] added typecasting to some hcl_xxxx() macros --- lib/hcl.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/hcl.h b/lib/hcl.h index 6d7cbff..0c16c91 100644 --- a/lib/hcl.h +++ b/lib/hcl.h @@ -1445,13 +1445,13 @@ HCL_EXPORT void hcl_setinloc ( static HCL_INLINE hcl_errnum_t hcl_geterrnum (hcl_t* hcl) { return hcl->errnum; } #else -# define hcl_getmmgr(hcl) ((hcl)->mmgr) -# define hcl_getxtn(hcl) ((void*)((hcl) + 1)) +# define hcl_getmmgr(hcl) (((hcl_t*)(hcl))->mmgr) +# define hcl_getxtn(hcl) ((void*)((hcl_t*)(hcl) + 1)) -# define hcl_getcmgr(hcl) ((hcl)->cmgr) -# define hcl_setcmgr(hcl,mgr) ((hcl)->cmgr = (mgr)) +# define hcl_getcmgr(hcl) (((hcl_t*)(hcl))->cmgr) +# define hcl_setcmgr(hcl,mgr) (((hcl_t*)(hcl))->cmgr = (mgr)) -# define hcl_geterrnum(hcl) ((hcl)->errnum) +# define hcl_geterrnum(hcl) (((hcl_t*)(hcl))->errnum) #endif HCL_EXPORT void hcl_seterrnum (