Ticket #12833: 0021-block_cache.cpp-fix-gcc-warnings.patch

File 0021-block_cache.cpp-fix-gcc-warnings.patch, 1004 bytes (added by mt, 4 years ago)
  • src/tools/fs_shell/block_cache.cpp

    From d6d6b5ee9bd7eb760dde9c645b39ae27a63660fa Mon Sep 17 00:00:00 2001
    From: Murai Takashi <tmurai01@gmail.com>
    Date: Sun, 26 Jun 2016 17:24:27 +0900
    Subject: [PATCH 21/21] block_cache.cpp: fix gcc warnings
    
    Since 'maxAccessed' and 'count' is int32,
    use INT32_MAX instead of LONG_MAX.
    ---
     src/tools/fs_shell/block_cache.cpp | 4 ++--
     1 file changed, 2 insertions(+), 2 deletions(-)
    
    diff --git a/src/tools/fs_shell/block_cache.cpp b/src/tools/fs_shell/block_cache.cpp
    index 72a6268..461e0bc 100644
    a b struct block_cache {  
    124124
    125125    void            Free(void* buffer);
    126126    void*           Allocate();
    127     void            RemoveUnusedBlocks(int32_t maxAccessed = LONG_MAX,
    128                         int32_t count = LONG_MAX);
     127    void            RemoveUnusedBlocks(int32_t maxAccessed = INT32_MAX,
     128                        int32_t count = INT32_MAX);
    129129    void            RemoveBlock(cached_block* block);
    130130    void            DiscardBlock(cached_block* block);
    131131    void            FreeBlock(cached_block* block);