[gs-commits] mupdf 1.16.1.64 Avoid miscellaneous signedness issues.
[email protected] (Sebastian Rasmussen) Tue, 1 Oct 2019 14:55:51 +0000 (UTC)
| Newsgroups | gmane.comp.printing.ghostscript.cvs |
|---|---|
| Message-ID | <[email protected]> |
commit 2c2e12e05fb7506bb0276584283ce5a53480ddc2 Author: Sebastian Rasmussen <[email protected]> Date: Fri Sep 27 18:35:30 2019 +0200 Avoid miscellaneous signedness issues. diff --git a/source/html/html-layout.c b/source/html/html-layout.c index 2cb6416..f1e2b4e 100644 --- a/source/html/html-layout.c +++ b/source/html/html-layout.c @@ -950,7 +950,8 @@ static void draw_flow_box(fz_context *ctx, fz_html_box *box, float page_top, flo { float node_scale = node->box->em / walker.scale; unsigned int i; - int c, k, n; + uint32_t k; + int c, n; /* Flatten advance and offset into offset array. */ int x_advance = 0; diff --git a/source/pdf/pdf-form.c b/source/pdf/pdf-form.c index 0f13d41..dbb8f1e 100644 --- a/source/pdf/pdf-form.c +++ b/source/pdf/pdf-form.c @@ -1160,7 +1160,7 @@ static void validate_certificate_data(fz_context *ctx, pdf_document *doc, fz_ran if (c != EOF) fz_throw(ctx, FZ_ERROR_GENERIC, "signature certificate data contains invalid character"); - if (fz_tell(ctx, stm) != hole->length) + if ((size_t)fz_tell(ctx, stm) != hole->length) fz_throw(ctx, FZ_ERROR_GENERIC, "premature end of signature certificate data"); } fz_always(ctx) diff --git a/source/pdf/pdf-xref.c b/source/pdf/pdf-xref.c index df79f18..3ce3baa 100644 --- a/source/pdf/pdf-xref.c +++ b/source/pdf/pdf-xref.c @@ -904,7 +904,7 @@ pdf_read_old_xref(fz_context *ctx, pdf_document *doc, pdf_lexbuf *buf) { pdf_xref_entry *entry = &table[i]; n = fz_read(ctx, file, (unsigned char *) buf->scratch + carried, 20-carried); - if (n != 20-carried) + if (n != (size_t)(20-carried)) fz_throw(ctx, FZ_ERROR_GENERIC, "unexpected EOF in xref table"); n += carried; buf->scratch[n] = '\0'; diff --git a/source/tools/murun.c b/source/tools/murun.c index 3ec61b6..16582b5 100644 --- a/source/tools/murun.c +++ b/source/tools/murun.c @@ -141,7 +141,7 @@ static void jsB_read(js_State *J) } t = fread(s, 1, n, f); - if (t != n) { + if (t != (size_t) n) { fz_free(ctx, s); fclose(f); js_error(J, "cannot read data from file: '%s'", filename); http://git.ghostscript.com/?p=mupdf.git;a=commit;h=2c2e12e05fb7506bb0276584283ce5a53480ddc2 -- MuPDF library Artifex Software, Inc.