diff options
author | Robin Watts <robin.watts@artifex.com> | 2016-01-04 17:18:19 +0000 |
---|---|---|
committer | Robin Watts <robin.watts@artifex.com> | 2016-01-04 18:59:07 +0000 |
commit | 7069210f88b764929a32713ab5032f02097b62b5 (patch) | |
tree | e337a2815d746f1f8b1b6a3827b1918ff3637980 /xps/xpsjpeg.c | |
parent | d697081ba9f0943977ed5ae8a62c7389046a5776 (diff) | |
download | ghostpdl-7069210f88b764929a32713ab5032f02097b62b5.tar.gz |
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.
Diffstat (limited to 'xps/xpsjpeg.c')
-rw-r--r-- | xps/xpsjpeg.c | 4 |
1 files changed, 2 insertions, 2 deletions
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 { |