]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
common: Fix -pedantic warning. Don't do pointer arithmetic on void pointers
authorcloudwalk <cloudwalk@d7cf8633-e32d-0410-b094-e92efae38249>
Sat, 26 Sep 2020 04:59:56 +0000 (04:59 +0000)
committercloudwalk <cloudwalk@d7cf8633-e32d-0410-b094-e92efae38249>
Sat, 26 Sep 2020 04:59:56 +0000 (04:59 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12941 d7cf8633-e32d-0410-b094-e92efae38249

common.h

index d11b141cb9d92c491a42cf33dca9c65a910bbf42..360ed9c0435b7559ff09c0fa92a65b31c70da675 100644 (file)
--- 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
 {