[haiku-bugs] [Haiku] #12832: [Patch] JobSetupWindow.cpp: fix clang warning

  • From: "mt" <trac@xxxxxxxxxxxx>
  • Date: Sun, 26 Jun 2016 11:00:54 -0000

#12832: [Patch] JobSetupWindow.cpp: fix clang warning
------------------------------+------------------------------
 Reporter:  mt                |        Owner:  phoudoin
     Type:  bug               |       Status:  new
 Priority:  normal            |    Milestone:  Unscheduled
Component:  Drivers/Printers  |      Version:  R1/Development
 Keywords:                    |   Blocked By:
 Blocking:                    |  Has a Patch:  0
 Platform:  All               |
------------------------------+------------------------------
 Since 'lastPage' is int32, use INT32_MAX instead of LONG_MAX.

 {{{
 /home/haiku/haiku/haiku/src/add-
 ons/print/drivers/preview/JobSetupWindow.cpp:45:45: warning: comparison of
 constant 9223372036854775807 with expression of type 'int32' (aka 'int')
 is always false [-Wtautological-constant-out-of-range-compare]
         bool allPages = firstPage == 1 && lastPage == LONG_MAX;
                                           ~~~~~~~~ ^  ~~~~~~~~
 }}}

--
Ticket URL: <https://dev.haiku-os.org/ticket/12832>
Haiku <https://dev.haiku-os.org>
Haiku - the operating system.

Other related posts: