summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2009-08-24 11:59:43 +0000
committerJohn Mark Bell <jmb@netsurf-browser.org>2009-08-24 11:59:43 +0000
commit03d181b65da62ed9ab843d8612cd9413ca6fa6c0 (patch)
treebc4e58d5567771ec2ca609f1400a2305177a4523 /utils
parent58b1ba5e681c356d8406f50529f5ad41f50b8646 (diff)
downloadnetsurf-03d181b65da62ed9ab843d8612cd9413ca6fa6c0.tar.gz
netsurf-03d181b65da62ed9ab843d8612cd9413ca6fa6c0.tar.bz2
Squash warnings
svn path=/trunk/netsurf/; revision=9431
Diffstat (limited to 'utils')
-rw-r--r--utils/memdebug.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/utils/memdebug.c b/utils/memdebug.c
index 312d66992..c8e28dc32 100644
--- a/utils/memdebug.c
+++ b/utils/memdebug.c
@@ -141,7 +141,7 @@ void *memdebug_malloc(size_t wantedsize, int line, const char *source)
}
if(logfile && source)
- fprintf(logfile, "MEM %s:%d malloc(%u) = %p\n",
+ fprintf(logfile, "MEM %s:%d malloc(%zu) = %p\n",
source, line, wantedsize, mem ? mem->mem : 0);
return (mem ? mem->mem : NULL);
}
@@ -171,7 +171,7 @@ void *memdebug_calloc(size_t wanted_elements, size_t wanted_size,
}
if(logfile && source)
- fprintf(logfile, "MEM %s:%d calloc(%u,%u) = %p\n",
+ fprintf(logfile, "MEM %s:%d calloc(%zu,%zu) = %p\n",
source, line, wanted_elements, wanted_size, mem ? mem->mem : 0);
return (mem ? mem->mem : NULL);
}
@@ -193,7 +193,7 @@ char *memdebug_strdup(const char *str, int line, const char *source)
memcpy(mem, str, len);
if(logfile)
- fprintf(logfile, "MEM %s:%d strdup(%p) (%u) = %p\n",
+ fprintf(logfile, "MEM %s:%d strdup(%p) (%zu) = %p\n",
source, line, str, len, mem);
return mem;
@@ -220,7 +220,7 @@ char *memdebug_strndup(const char *str, size_t size, int line, const char *sourc
}
if(logfile)
- fprintf(logfile, "MEM %s:%d strndup(%p, %d) (%u) = %p\n",
+ fprintf(logfile, "MEM %s:%d strndup(%p, %zd) (%zu) = %p\n",
source, line, str, size, len, mem);
return mem;
@@ -240,7 +240,8 @@ void *memdebug_realloc(void *ptr, size_t wantedsize,
return NULL;
if(ptr) {
- mem = (struct memdebug *)((char *)ptr - offsetof(struct memdebug, mem));
+ mem = (struct memdebug *)(void *)
+ ((char *)ptr - offsetof(struct memdebug, mem));
}
if(logfile) {
@@ -249,7 +250,7 @@ void *memdebug_realloc(void *ptr, size_t wantedsize,
for (i = 0; mem && i != 8; i++)
if (((char *) mem->mem)[mem->size + i] != GUARD)
fprintf(logfile, "GUARD %u match failed!\n", i);
- fprintf(logfile, "MEM %s:%d realloc(%p, %u) = ",
+ fprintf(logfile, "MEM %s:%d realloc(%p, %zu) = ",
source, line, ptr, wantedsize);
fflush(logfile);
}
@@ -279,7 +280,8 @@ void memdebug_free(void *ptr, int line, const char *source)
assert(ptr != NULL);
- mem = (struct memdebug *)((char *)ptr - offsetof(struct memdebug, mem));
+ mem = (struct memdebug *)(void *)
+ ((char *)ptr - offsetof(struct memdebug, mem));
if(logfile) {
fprintf(logfile, "MEM %s:%d free(%p)\n", source, line, ptr);
if (mem->magic != MAGIC) {