]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Fix a compiler warning.
authormsweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be>
Thu, 28 May 2015 19:09:48 +0000 (19:09 +0000)
committermsweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be>
Thu, 28 May 2015 19:09:48 +0000 (19:09 +0000)
PWG Raster Format output contained invalid ImageBox values
(<rdar://problem/21144309>)

git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@12678 a1ca3aef-8c08-0410-bb20-df032aa958be

CHANGES-2.0.txt
cups/testhttp.c
filter/raster.c

index cb4bc3873655890f93b8b56fdca674108e99112c..5023fd1ce1b1c47dbae06ba6f01606587c5d1e8f 100644 (file)
@@ -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
+         (<rdar://problem/21144309>)
        - Added Russian translation (STR #4577)
 
 
index 808aa4dd5fe975cc1bd615f5d9d626d63ff9e045..1c6bcb2cba7730b769f600cb999d36e0268a3ac1 100644 (file)
@@ -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);
index 024eedf74169e47daa5d43516e2d3ca773073961..87e38b226733adef88e2463653d84049722af209 100644 (file)
@@ -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));