Skip to content

Commit

Permalink
Correct printf formats in test/infcover.c to %zu.
Browse files Browse the repository at this point in the history
  • Loading branch information
madler committed Feb 7, 2024
1 parent 96d3e9e commit 81e7c38
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/infcover.c
Original file line number Diff line number Diff line change
Expand Up @@ -185,15 +185,15 @@ local void mem_used(z_stream *strm, char *prefix)
{
struct mem_zone *zone = strm->opaque;

fprintf(stderr, "%s: %lu allocated\n", prefix, zone->total);
fprintf(stderr, "%s: %zu allocated\n", prefix, zone->total);
}

/* show the high water allocation in bytes */
local void mem_high(z_stream *strm, char *prefix)
{
struct mem_zone *zone = strm->opaque;

fprintf(stderr, "%s: %lu high water mark\n", prefix, zone->highwater);
fprintf(stderr, "%s: %zu high water mark\n", prefix, zone->highwater);
}

/* release the memory allocation zone -- if there are any surprises, notify */
Expand All @@ -218,7 +218,7 @@ local void mem_done(z_stream *strm, char *prefix)

/* issue alerts about anything unexpected */
if (count || zone->total)
fprintf(stderr, "** %s: %lu bytes in %d blocks not freed\n",
fprintf(stderr, "** %s: %zu bytes in %d blocks not freed\n",
prefix, zone->total, count);
if (zone->notlifo)
fprintf(stderr, "** %s: %d frees not LIFO\n", prefix, zone->notlifo);
Expand Down

0 comments on commit 81e7c38

Please sign in to comment.