[gs-commits] mupdf 1.16.1.epub-prerelease-32 Moar fixes.
[email protected] (Robin Watts) Thu, 2 Jan 2020 11:19:12 +0000 (UTC)
| Newsgroups | gmane.comp.printing.ghostscript.cvs |
|---|---|
| Message-ID | <[email protected]> |
commit fd37dd1fb459d1c75d89e866c54983e3fe3551bb Author: Robin Watts <[email protected]> Date: Wed Jan 1 16:39:55 2020 +0000 Moar fixes. diff --git a/platform/x11/win_main.c b/platform/x11/win_main.c index 7cdf272..db2da9e 100644 --- a/platform/x11/win_main.c +++ b/platform/x11/win_main.c @@ -395,7 +395,7 @@ dlogtextproc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) SetTextColor((HDC)wParam, RGB(255,0,0)); SetBkMode((HDC)wParam, TRANSPARENT); - return (INT)GetStockObject(NULL_BRUSH); + return (INT_PTR)GetStockObject(NULL_BRUSH); } break; } @@ -817,7 +817,7 @@ static void winblit() if (image_n == 2) { - int i = image_w * image_h; + size_t i = image_w * (size_t)image_h; unsigned char *color = malloc(i*4); unsigned char *s = samples; unsigned char *d = color; diff --git a/source/fitz/output-psd.c b/source/fitz/output-psd.c index 06c0b8b..7b6fa38 100644 --- a/source/fitz/output-psd.c +++ b/source/fitz/output-psd.c @@ -198,7 +198,7 @@ psd_write_header(fz_context *ctx, fz_band_writer *writer_, fz_colorspace *cs) fz_write_data(ctx, out, ressig, 4); fz_write_int16_be(ctx, out, 0x40f); /* ICC Profile */ fz_write_data(ctx, out, "\x07Profile", 8); /* Profile name (must be even!) */ - fz_write_int32_be(ctx, out, size); + fz_write_int32_be(ctx, out, (int)size); fz_write_data(ctx, out, data, size); /* Actual data */ if (size & 1) fz_write_byte(ctx, out, 0); /* Pad to even */ @@ -285,8 +285,8 @@ psd_write_band(fz_context *ctx, fz_band_writer *writer_, int stride, int band_st sp += line_skip; ap += line_skip; } - sp -= stride * band_height - 1; - ap -= stride * band_height; + sp -= stride * (ptrdiff_t)band_height - 1; + ap -= stride * (ptrdiff_t)band_height; if (b != buffer) { if (k >= num_additive) @@ -337,7 +337,7 @@ psd_write_band(fz_context *ctx, fz_band_writer *writer_, int stride, int band_st } sp += line_skip; } - sp -= stride * band_height - 1; + sp -= stride * (ptrdiff_t)band_height - 1; if (b != buffer) { if (k >= num_additive) diff --git a/source/tools/murun.c b/source/tools/murun.c index 16582b5..42e05fd 100644 --- a/source/tools/murun.c +++ b/source/tools/murun.c @@ -3786,7 +3786,7 @@ static void ffi_PDFObject_asByteString(js_State *J) js_newarray(J); for (i = 0; i < len; ++i) { js_pushnumber(J, (unsigned char)buf[i]); - js_setindex(J, -2, i); + js_setindex(J, -2, (int)i); } } http://git.ghostscript.com/?p=mupdf.git;a=commit;h=fd37dd1fb459d1c75d89e866c54983e3fe3551bb -- MuPDF library Artifex Software, Inc.