]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - zone.c
made darkplaces compile successfully with g++ to test for errors C doesn't care about...
[xonotic/darkplaces.git] / zone.c
diff --git a/zone.c b/zone.c
index ced5e82e37f99c767bf87193a9e7dcaea3d486fc..590dd8393ca8d74321b6615da17cdfe0d2bbc39f 100644 (file)
--- a/zone.c
+++ b/zone.c
@@ -101,7 +101,7 @@ choseclump:
                // big allocations are not clumped
 #endif
                pool->realsize += sizeof(memheader_t) + size + sizeof(int);
-               mem = malloc(sizeof(memheader_t) + size + sizeof(int));
+               mem = (memheader_t *)malloc(sizeof(memheader_t) + size + sizeof(int));
                if (mem == NULL)
                        Sys_Error("Mem_Alloc: out of memory (alloc at %s:%i)", filename, fileline);
 #if MEMCLUMPING
@@ -216,7 +216,7 @@ mempool_t *_Mem_AllocPool(const char *name, int flags, mempool_t *parent, const
        mempool_t *pool;
        if (developer.integer && developer_memorydebug.integer)
                _Mem_CheckSentinelsGlobal(filename, fileline);
-       pool = malloc(sizeof(mempool_t));
+       pool = (mempool_t *)malloc(sizeof(mempool_t));
        if (pool == NULL)
                Sys_Error("Mem_AllocPool: out of memory (allocpool at %s:%i)", filename, fileline);
        memset(pool, 0, sizeof(mempool_t));