From: msweet Date: Thu, 28 May 2015 19:09:48 +0000 (+0000) Subject: Fix a compiler warning. X-Git-Tag: v2.2b1~278 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=89665c51edcb7f4aa2648993d93cf2b0e060ad3a;p=thirdparty%2Fcups.git Fix a compiler warning. PWG Raster Format output contained invalid ImageBox values () git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@12678 a1ca3aef-8c08-0410-bb20-df032aa958be --- diff --git a/CHANGES-2.0.txt b/CHANGES-2.0.txt index cb4bc38736..5023fd1ce1 100644 --- a/CHANGES-2.0.txt +++ b/CHANGES-2.0.txt @@ -27,6 +27,8 @@ CHANGES IN CUPS V2.0.3 - The IPP/1.1 test file did not handle the initial print job completing early (STR #4576) - Fixed a memory leak in cupsConnectDest (STR #4634) + - PWG Raster Format output contained invalid ImageBox values + () - Added Russian translation (STR #4577) diff --git a/cups/testhttp.c b/cups/testhttp.c index 808aa4dd5f..1c6bcb2cba 100644 --- a/cups/testhttp.c +++ b/cups/testhttp.c @@ -645,7 +645,6 @@ main(int argc, /* I - Number of command-line arguments */ if (lcreds && cupsArrayCount(creds) == cupsArrayCount(lcreds)) { - int i; http_credential_t *cred, *lcred; for (i = 1, cred = (http_credential_t *)cupsArrayFirst(creds), lcred = (http_credential_t *)cupsArrayFirst(lcreds); diff --git a/filter/raster.c b/filter/raster.c index 024eedf741..87e38b2267 100644 --- a/filter/raster.c +++ b/filter/raster.c @@ -706,14 +706,10 @@ cupsRasterWriteHeader2( fh.cupsInteger[0] = htonl(r->header.cupsInteger[0]); fh.cupsInteger[1] = htonl(r->header.cupsInteger[1]); fh.cupsInteger[2] = htonl(r->header.cupsInteger[2]); - fh.cupsInteger[3] = htonl((unsigned)(r->header.cupsImagingBBox[0] * - r->header.HWResolution[0])); - fh.cupsInteger[4] = htonl((unsigned)(r->header.cupsImagingBBox[1] * - r->header.HWResolution[1])); - fh.cupsInteger[5] = htonl((unsigned)(r->header.cupsImagingBBox[2] * - r->header.HWResolution[0])); - fh.cupsInteger[6] = htonl((unsigned)(r->header.cupsImagingBBox[3] * - r->header.HWResolution[1])); + fh.cupsInteger[3] = htonl((unsigned)(r->header.cupsImagingBBox[0] * r->header.HWResolution[0] / 72.0)); + fh.cupsInteger[4] = htonl((unsigned)(r->header.cupsImagingBBox[1] * r->header.HWResolution[1] / 72.0)); + fh.cupsInteger[5] = htonl((unsigned)(r->header.cupsImagingBBox[2] * r->header.HWResolution[0] / 72.0)); + fh.cupsInteger[6] = htonl((unsigned)(r->header.cupsImagingBBox[3] * r->header.HWResolution[1] / 72.0)); fh.cupsInteger[7] = htonl(0xffffff); return (cups_raster_io(r, (unsigned char *)&fh, sizeof(fh)) == sizeof(fh));