Use %zi to print size_t.

This commit is contained in:
Ralf Corsepius
2008-08-25 11:15:14 +00:00
parent 8b7ec01157
commit 68c65d657a

View File

@@ -159,7 +159,7 @@ void reportMallocError(const char *msg, struct mallocNode *mp)
mp, mp->forw, mp->forw->back, mp->back, mp->back->forw); mp, mp->forw, mp->forw->back, mp->back, mp->back->forw);
if (mp->memory != (mp + 1)) if (mp->memory != (mp + 1))
ind += sprintf(cbuf+ind, "mp+1:%p ", mp + 1); ind += sprintf(cbuf+ind, "mp+1:%p ", mp + 1);
ind += sprintf(cbuf+ind, "mp->memory:%p mp->size:%li\n", mp->memory, mp->size); ind += sprintf(cbuf+ind, "mp->memory:%p mp->size:%zi\n", mp->memory, mp->size);
if (memcmp((char *)mp->memory + mp->size, SENTINEL, SENTINELSIZE) != 0) { if (memcmp((char *)mp->memory + mp->size, SENTINEL, SENTINELSIZE) != 0) {
ind += sprintf(cbuf+ind, "mp->sentinel: "); ind += sprintf(cbuf+ind, "mp->sentinel: ");
for (i = 0 ; i < SENTINELSIZE ; i++) for (i = 0 ; i < SENTINELSIZE ; i++)