[gnome-commander] searcher.cc: fix for sign-compare



commit 7b2dbbcdaef776c83ebdf7991cc9497c1b626adf
Author: Mamoru TASAKA <mtasaka fedoraproject org>
Date:   Wed Apr 19 15:44:22 2017 +0900

    searcher.cc: fix for sign-compare
    
    src/intviewer/searcher.cc:351:14: note: in expansion of macro 'MAX'
    src/intviewer/searcher.cc:405:14: note: in expansion of macro 'MAX'

 src/intviewer/searcher.cc |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/intviewer/searcher.cc b/src/intviewer/searcher.cc
index ad48ef0..88da257 100644
--- a/src/intviewer/searcher.cc
+++ b/src/intviewer/searcher.cc
@@ -348,7 +348,7 @@ static gboolean search_hex_forward (GViewerSearcher *src)
             break;
         }
 
-        j += MAX(data->good[i], data->bad[value] - m + 1 + i);
+        j += MAX((offset_type)data->good[i], data->bad[value] - m + 1 + i);
 
         if (--update_counter==0)
         {
@@ -402,7 +402,7 @@ static gboolean search_hex_backward (GViewerSearcher *src)
             break;
         }
 
-        j -= MAX(data->good[i], data->bad[value] - m + 1 + i);
+        j -= MAX((offset_type)data->good[i], data->bad[value] - m + 1 + i);
 
         if (--update_counter==0)
         {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]