changeset 30735:4335606e41ac

maint: remove unused variables identified by compiler warnings (Bug #62017) * str-vec.cc (list_in_columns): remove unused variable pos. * oct-stream.cc (stream::read): remove unused variable char_count. * pt-eval.cc (class debugger): remove unused member variable m_debug_frame. * oct-lvalue.h (class octave_lvalue): remove unused member variable m_nel.
author Antonius Burgers <arburgers@gmail.com>
date Thu, 10 Feb 2022 09:17:46 +0100
parents 848db528a2c5
children 7ee1ec5753c1
files libinterp/corefcn/oct-stream.cc libinterp/parse-tree/oct-lvalue.h libinterp/parse-tree/pt-eval.cc liboctave/util/str-vec.cc
diffstat 4 files changed, 1 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/libinterp/corefcn/oct-stream.cc	Sat Feb 12 12:26:09 2022 -0500
+++ b/libinterp/corefcn/oct-stream.cc	Thu Feb 10 09:17:46 2022 +0100
@@ -6593,9 +6593,6 @@
     // consistent with the order of the elements in the data_type enum in the
     // oct_data_conv class.
 
-    // Expose this in a future version?
-    std::size_t char_count = 0;
-
     std::ptrdiff_t tmp_count = 0;
 
     try
@@ -6699,7 +6696,6 @@
 
             std::size_t gcount = is.gcount ();
 
-            char_count += gcount;
             cur_pos += gcount;
 
             octave_idx_type nel = gcount / input_elt_size;
--- a/libinterp/parse-tree/oct-lvalue.h	Sat Feb 12 12:26:09 2022 -0500
+++ b/libinterp/parse-tree/oct-lvalue.h	Thu Feb 10 09:17:46 2022 +0100
@@ -106,8 +106,6 @@
     std::string m_type;
 
     std::list<octave_value_list> m_idx;
-
-    octave_idx_type m_nel;
   };
 }
 
--- a/libinterp/parse-tree/pt-eval.cc	Sat Feb 12 12:26:09 2022 -0500
+++ b/libinterp/parse-tree/pt-eval.cc	Thu Feb 10 09:17:46 2022 +0100
@@ -107,7 +107,7 @@
       };
 
     debugger (interpreter& interp, std::size_t level)
-      : m_interpreter (interp), m_level (level), m_debug_frame (0),
+      : m_interpreter (interp), m_level (level),
         m_execution_mode (EX_NORMAL), m_in_debug_repl (false)
     { }
 
@@ -134,7 +134,6 @@
     interpreter& m_interpreter;
 
     std::size_t m_level;
-    std::size_t m_debug_frame;
     execution_mode m_execution_mode;
     bool m_in_debug_repl;
   };
--- a/liboctave/util/str-vec.cc	Sat Feb 12 12:26:09 2022 -0500
+++ b/liboctave/util/str-vec.cc	Thu Feb 10 09:17:46 2022 +0100
@@ -244,7 +244,6 @@
   for (octave_idx_type row = 0; row < nr; row++)
     {
       count = row;
-      octave_idx_type pos = 0;
 
       // Print the next row.
 
@@ -264,7 +263,6 @@
           octave_idx_type spaces_to_pad = max_name_length - name_length;
           for (octave_idx_type i = 0; i < spaces_to_pad; i++)
             os << ' ';
-          pos += max_name_length;
         }
       os << "\n";
     }