From 17784e754815ec5f897858af0f2bf70784f1532a Mon Sep 17 00:00:00 2001 From: cloudwalk Date: Sat, 26 Sep 2020 04:59:56 +0000 Subject: [PATCH] common: Fix -pedantic warning. Don't do pointer arithmetic on void pointers git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12941 d7cf8633-e32d-0410-b094-e92efae38249 --- common.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common.h b/common.h index d11b141c..360ed9c0 100644 --- a/common.h +++ b/common.h @@ -38,7 +38,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. //============================================================================ -#define ContainerOf(ptr, type, member) ((type *)((void *)&(ptr) - offsetof(type, member))) +#define ContainerOf(ptr, type, member) ((type *)((char *)&(ptr) - offsetof(type, member))) typedef struct sizebuf_s { -- 2.39.2