From d3b4ca1dd7d23166feebe1a0c0e57e2157dd6348 Mon Sep 17 00:00:00 2001 From: Tim Kientzle Date: Fri, 20 Feb 2015 21:37:37 -0800 Subject: [PATCH] Issue 412: Use uint64_t throughout for file sizes --- libarchive/archive_write_set_format_warc.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libarchive/archive_write_set_format_warc.c b/libarchive/archive_write_set_format_warc.c index c4416ec1c..85af965ee 100644 --- a/libarchive/archive_write_set_format_warc.c +++ b/libarchive/archive_write_set_format_warc.c @@ -56,7 +56,7 @@ struct warc_s { mode_t typ; unsigned int rng; /* populated size */ - size_t populz; + uint64_t populz; }; static const char warcinfo[] = @@ -92,7 +92,7 @@ typedef struct { time_t rtime; time_t mtime; const char *cnttyp; - size_t cntlen; + uint64_t cntlen; } warc_essential_hdr_t; typedef struct { @@ -270,7 +270,7 @@ _warc_data(struct archive_write *a, const void *buf, size_t len) /* never write more bytes than announced */ if (len > w->populz) { - len = w->populz; + len = (size_t)w->populz; } /* now then, out we put the whole shebang */ @@ -417,7 +417,7 @@ _popul_ehdr(struct archive_string *tgt, size_t tsz, warc_essential_hdr_t hdr) } /* next one is mandatory */ - archive_string_sprintf(tgt, "Content-Length: %zu\r\n", hdr.cntlen); + archive_string_sprintf(tgt, "Content-Length: %ju\r\n", (uintmax_t)hdr.cntlen); /**/ archive_strncat(tgt, "\r\n", 2); -- 2.47.2