[gnome-commander/ConvertWarningsToErrors] fix warning: variable set but not used



commit 749369cd9931df2159134bcfdfed478cc95ad72b
Author: Andreas Henriksson <andreas fatal se>
Date:   Tue Apr 18 23:42:33 2017 +0200

    fix warning: variable set but not used
    
    viewer-widget.cc:297:14: error: variable ‘ascii_chars’ set but not used [-Werror=unused-but-set-variable]
         gboolean ascii_chars = FALSE;
                  ^~~~~~~~~~~
    viewer-widget.cc:298:14: error: variable ‘extended_chars’ set but not used 
[-Werror=unused-but-set-variable]
         gboolean extended_chars = FALSE; /* True if found ASCII >= 0x80 */
                  ^~~~~~~~~~~~~~

 src/intviewer/viewer-widget.cc |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/src/intviewer/viewer-widget.cc b/src/intviewer/viewer-widget.cc
index 069daa0..c685d45 100644
--- a/src/intviewer/viewer-widget.cc
+++ b/src/intviewer/viewer-widget.cc
@@ -295,8 +295,8 @@ static void gviewer_destroy (GtkObject *widget)
 static VIEWERDISPLAYMODE guess_display_mode(const unsigned char *data, int len)
 {
     gboolean control_chars = FALSE; /* True if found ASCII < 0x20 */
-    gboolean ascii_chars = FALSE;
-    gboolean extended_chars = FALSE; /* True if found ASCII >= 0x80 */
+    //gboolean ascii_chars = FALSE;
+    //gboolean extended_chars = FALSE; /* True if found ASCII >= 0x80 */
 
     const char *mime = gnome_vfs_get_mime_type_for_data(data, len);
 
@@ -308,10 +308,10 @@ static VIEWERDISPLAYMODE guess_display_mode(const unsigned char *data, int len)
     {
         if (data[i]<0x20 && data[i]!=10 && data[i]!=13 && data[i]!=9)
             control_chars = TRUE;
-        if (data[i]>=0x80)
-            extended_chars = TRUE;
-        if (data[i]>=0x20 && data[i]<=0x7F)
-            ascii_chars = TRUE;
+        //if (data[i]>=0x80)
+        //    extended_chars = TRUE;
+        //if (data[i]>=0x20 && data[i]<=0x7F)
+        //    ascii_chars = TRUE;
         /* TODO: add UTF-8 detection */
     }
 


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