diff options
author | Mathew Mrosko <banu-bugzilla@matmrosko.com> | 2009-11-16 21:49:19 +0530 |
---|---|---|
committer | Mukund Sivaraman <muks@banu.com> | 2009-11-16 21:50:40 +0530 |
commit | 238e3ffb3486e4f25e4f60b1bc2a61034178ed60 (patch) | |
tree | d4aea4968407f20f4bd65c6e3b9105fd9f25a76c /src | |
parent | 2f05d8dd326b4e392eb57f6b4e8e461b33a335bc (diff) | |
download | tinyproxy-238e3ffb3486e4f25e4f60b1bc2a61034178ed60.tar.gz tinyproxy-238e3ffb3486e4f25e4f60b1bc2a61034178ed60.zip |
Fix format string warnings
C90 doesn't support z modifier in printf's, so cast values
to (unsigned long) which should be the same size as size_t
on both ILP32 and LP64.
Diffstat (limited to '')
-rw-r--r-- | src/heap.c | 14 |
1 files changed, 8 insertions, 6 deletions
@@ -38,8 +38,8 @@ void *debugging_calloc (size_t nmemb, size_t size, const char *file, assert (size > 0); ptr = calloc (nmemb, size); - fprintf (stderr, "{calloc: %p:%zu x %zu} %s:%lu\n", ptr, nmemb, size, - file, line); + fprintf (stderr, "{calloc: %p:%lu x %lu} %s:%lu\n", ptr, + (unsigned long) nmemb, (unsigned long) size, file, line); return ptr; } @@ -50,7 +50,8 @@ void *debugging_malloc (size_t size, const char *file, unsigned long line) assert (size > 0); ptr = malloc (size); - fprintf (stderr, "{malloc: %p:%zu} %s:%lu\n", ptr, size, file, line); + fprintf (stderr, "{malloc: %p:%lu} %s:%lu\n", ptr, + (unsigned long) size, file, line); return ptr; } @@ -62,8 +63,8 @@ void *debugging_realloc (void *ptr, size_t size, const char *file, assert (size > 0); newptr = realloc (ptr, size); - fprintf (stderr, "{realloc: %p -> %p:%zu} %s:%lu\n", ptr, newptr, size, - file, line); + fprintf (stderr, "{realloc: %p -> %p:%lu} %s:%lu\n", ptr, newptr, + (unsigned long) size, file, line); return newptr; } @@ -89,7 +90,8 @@ char *debugging_strdup (const char *s, const char *file, unsigned long line) return NULL; memcpy (ptr, s, len); - fprintf (stderr, "{strdup: %p:%zu} %s:%lu\n", ptr, len, file, line); + fprintf (stderr, "{strdup: %p:%lu} %s:%lu\n", ptr, + (unsigned long) len, file, line); return ptr; } |