From 7069210f88b764929a32713ab5032f02097b62b5 Mon Sep 17 00:00:00 2001 From: Robin Watts Date: Mon, 4 Jan 2016 17:18:19 +0000 Subject: Squash warnings: XPS MSVC Add some casts etc to squash (most of) the warnings seen in an MSVC debug build of ghostxps. We have an unavoidable "cast away of const" in a devspecop call, and various stupidities in the jpegxr lib left over. --- xps/xpsjpeg.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'xps/xpsjpeg.c') diff --git a/xps/xpsjpeg.c b/xps/xpsjpeg.c index 29fc375c1..d419ed121 100644 --- a/xps/xpsjpeg.c +++ b/xps/xpsjpeg.c @@ -117,8 +117,8 @@ xps_decode_jpeg(xps_context_t *ctx, byte *rbuf, int rlen, xps_image_t *image) } else if (jddp.dinfo.density_unit == 2) { - image->xres = jddp.dinfo.X_density * 2.54; - image->yres = jddp.dinfo.Y_density * 2.54; + image->xres = (int)(jddp.dinfo.X_density * 2.54 + 0.5); + image->yres = (int)(jddp.dinfo.Y_density * 2.54 + 0.5); } else { -- cgit v1.2.1