Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

xmlmemory: add a cast as size_t has no portable printf modifier

Also use %lu as that is more appropriate for size_t.
  • Loading branch information...
commit ecb5d5afdc8acceba608524f6e98c361fd2ce0e9 1 parent a154040
@ensonic ensonic authored
Showing with 7 additions and 4 deletions.
  1. +7 −4 xmlmemory.c
View
11 xmlmemory.c
@@ -205,7 +205,8 @@ xmlMallocLoc(size_t size, const char * file, int line)
if (xmlMemTraceBlockAt == ret) {
xmlGenericError(xmlGenericErrorContext,
- "%p : Malloc(%ld) Ok\n", xmlMemTraceBlockAt, size);
+ "%p : Malloc(%lu) Ok\n", xmlMemTraceBlockAt,
+ (long unsigned)size);
xmlMallocBreakpoint();
}
@@ -273,7 +274,8 @@ xmlMallocAtomicLoc(size_t size, const char * file, int line)
if (xmlMemTraceBlockAt == ret) {
xmlGenericError(xmlGenericErrorContext,
- "%p : Malloc(%ld) Ok\n", xmlMemTraceBlockAt, size);
+ "%p : Malloc(%lu) Ok\n", xmlMemTraceBlockAt,
+ (long unsigned)size);
xmlMallocBreakpoint();
}
@@ -348,8 +350,9 @@ xmlReallocLoc(void *ptr,size_t size, const char * file, int line)
}
if (xmlMemTraceBlockAt == ptr) {
xmlGenericError(xmlGenericErrorContext,
- "%p : Realloced(%ld -> %ld) Ok\n",
- xmlMemTraceBlockAt, p->mh_size, size);
+ "%p : Realloced(%lu -> %lu) Ok\n",
+ xmlMemTraceBlockAt, (long unsigned)p->mh_size,
+ (long unsigned)size);
xmlMallocBreakpoint();
}
p->mh_tag = MEMTAG;
Please sign in to comment.
Something went wrong with that request. Please try again.