[haiku-bugs] [Haiku] #12833: [Patch] tools/fs_shell/block_cache.cpp: fix gcc warnings

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

#12833: [Patch] tools/fs_shell/block_cache.cpp: fix gcc warnings
---------------------------------------------+-----------------------------
 Reporter:  mt                               |        Owner:  nobody
     Type:  bug                              |       Status:  new
 Priority:  normal                           |    Milestone:  Unscheduled
Component:  Applications/Command Line Tools  |      Version:
 Keywords:  fs_shell                         |  R1/Development
 Blocking:                                   |   Blocked By:
 Platform:  All                              |  Has a Patch:  0
---------------------------------------------+-----------------------------
 Since 'maxAccessed' and 'count' is int32, use INT32_MAX instead of
 LONG_MAX.

 {{{
 /home/haiku/haiku/haiku/src/tools/fs_shell/block_cache.cpp:127:50:
 warning: overflow in implicit constant conversion [-Woverflow]
   void   RemoveUnusedBlocks(int32_t maxAccessed = LONG_MAX,
                                                   ^
 /home/haiku/haiku/haiku/src/tools/fs_shell/block_cache.cpp:128:23:
 warning: overflow in implicit constant conversion [-Woverflow]
        int32_t count = LONG_MAX);
                        ^
 }}}

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

Other related posts: