]> git.ipfire.org Git - thirdparty/HylaFAX.git/commitdiff
[Bug 267] Fix gcc warnings in -Wall mode
authorDarren Nickerson <darren.nickerson@ifax.com>
Mon, 30 Jun 2003 04:51:45 +0000 (04:51 +0000)
committerDarren Nickerson <darren.nickerson@ifax.com>
Mon, 30 Jun 2003 04:51:45 +0000 (04:51 +0000)
We broke page chopping in 4.1.6. This patch repairs the damage by making
MaxPageLength stay consistently cast as u_short. Thanks to Lee and Aidan
for getting to the bottom of this one!

faxd/faxQueueApp.c++

index 6f88d18f071093b414a25c82f7a1605421dc04ee..9459b6acb4ff1a20e01d88e192b785af0289fc0f 100644 (file)
@@ -635,7 +635,7 @@ faxQueueApp::preparePageHandling(FaxRequest& req,
      * accepting variable-length pages.
      */
     u_int pagechop;
-    if (info.getMaxPageLengthInMM() == (unsigned)-1) {
+    if (info.getMaxPageLengthInMM() == (u_short)-1) {
        pagechop = req.pagechop;
        if (pagechop == FaxRequest::chop_default)
            pagechop = pageChop;
@@ -788,7 +788,7 @@ faxQueueApp::setupParams(TIFF* tif, Class2Params& params, const FaxMachineInfo&
      * vertical resolution.  Note that if the resolution
      * info is bogus, we may select the wrong page size.
      */
-    if (info.getMaxPageLengthInMM() != (unsigned)-1) {
+    if (info.getMaxPageLengthInMM() != (u_short)-1) {
        uint32 h;
        TIFFGetField(tif, TIFFTAG_IMAGELENGTH, &h);
        params.setPageLengthInMM((u_int)(h / yres));