Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Add -Wextra to CFLAGS too.
[simgrid.git] / src / xbt / mmalloc / mmprivate.h
index 5e380cc..f130695 100644 (file)
@@ -93,7 +93,7 @@ XBT_PRIVATE xbt_mheap_t mmalloc_preinit(void);
 
 /* Address to block number and vice versa.  */
 
-#define BLOCK(A) (((char*) (A) - (char*) mdp -> heapbase) / BLOCKSIZE + 1)
+#define BLOCK(A) ((size_t)(((char*)(A) - (char*)mdp->heapbase) / BLOCKSIZE + 1))
 
 #define ADDRESS(B) ((void*) (((ADDR2UINT(B)) - 1) * BLOCKSIZE + (char*) mdp -> heapbase))