Ticket #12832: 0020-JobSetupWindow.cpp-fix-clang-warning.patch

File 0020-JobSetupWindow.cpp-fix-clang-warning.patch, 1.0 KB (added by mt, 8 years ago)
  • src/add-ons/print/drivers/preview/JobSetupWindow.cpp

    From 3d318238405238f275c975903900904774e08238 Mon Sep 17 00:00:00 2001
    From: Murai Takashi <tmurai01@gmail.com>
    Date: Sun, 26 Jun 2016 16:36:52 +0900
    Subject: [PATCH 20/21] JobSetupWindow.cpp: fix clang warning
    
    Since 'lastPage' is int32, use INT32_MAX instead of LONG_MAX.
    ---
     src/add-ons/print/drivers/preview/JobSetupWindow.cpp | 2 +-
     1 file changed, 1 insertion(+), 1 deletion(-)
    
    diff --git a/src/add-ons/print/drivers/preview/JobSetupWindow.cpp b/src/add-ons/print/drivers/preview/JobSetupWindow.cpp
    index 5d14246..b162459 100644
    a b JobSetupWindow::JobSetupWindow(BMessage *msg, const char * printerName)  
    4242
    4343    int32 lastPage;
    4444    fSetupMsg->FindInt32("last_page", &lastPage);
    45     bool allPages = firstPage == 1 && lastPage == LONG_MAX;
     45    bool allPages = firstPage == 1 && lastPage == INT32_MAX;
    4646
    4747    fAll = new BRadioButton("allPages", "Print all pages",
    4848        new BMessage(ALL_PAGES_MGS));