Skip to content

Commit

Permalink
Added cast of unsigned long to printfs of size_t
Browse files Browse the repository at this point in the history
  • Loading branch information
rxi committed Jun 6, 2014
1 parent 739baa5 commit d62bd4b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/dmt.c
Expand Up @@ -159,9 +159,9 @@ void dmt_dump(FILE *fp) {
if (!fp) fp = stdout;

while (node != NULL) {
fprintf(fp, "Unfreed: %p %s, line %u (%u bytes)\n",
(char*)node + sizeof(*node),
node->file, node->line, node->size);
fprintf(fp, "Unfreed: %p %s, line %lu (%lu bytes)\n",
(char*)node + sizeof(*node), node->file,
(unsigned long)node->line, (unsigned long)node->size);

#ifdef DMT_STACK_TRACE
backtrace_symbols_fd(node->stacktrace, node->stacktrace_sz, fileno(fp));
Expand All @@ -172,7 +172,7 @@ void dmt_dump(FILE *fp) {
node = node->next;
}

fprintf(fp, "Total unfreed: %u bytes\n", total);
fprintf(fp, "Total unfreed: %lu bytes\n", (unsigned long)total);
}


Expand Down

0 comments on commit d62bd4b

Please sign in to comment.