diff src/pt-mat.cc @ 13219:cf5ebc0e47e4

fix warnings for unused but set variables and shadowed variables * quadcc.cc (Fquadcc): Delete unused variable err_excess. * find.cc (find_nonzero_elem_idx (const PermMatrix&, int, octave_idx_type, int)): Delete unused variable end_nc. * eigs.cc (Feigs): Delete unused variable bmat. * conv2.cc (Fconvn): Delete unused variable separable. * colamd.cc (Fetree, Fsymamd): Delete unused variable nnz. * ccolamd.cc (Fcsymamd): Delete unused variable nnz. * pt-pr-code.cc (tree_print_code::visit_index_expression): Delete unused variable expr_has_parens. * pt-mat.cc (tree_matrix::rvalue1): Delete unused variables all_complex_p and all_strings_p (tm_const::init): Eliminate shadowed variables. * gl-render.cc (opengl_renderer::draw_image): Delete unused variable ok.
author John W. Eaton <jwe@octave.org>
date Sun, 25 Sep 2011 16:52:23 -0400
parents c99f24c10ca3
children 7dce7e110511
line wrap: on
line diff
--- a/src/pt-mat.cc
+++ b/src/pt-mat.cc
@@ -612,25 +612,23 @@
 
   if (! error_state)
     {
-      iterator p = begin ();
-
       if (any_cell && ! any_class && ! first_elem_is_struct)
         {
-          for (iterator p = begin (); p != end (); p++)
+          for (iterator q = begin (); q != end (); q++)
             {
               octave_quit ();
 
-              p->cellify ();
+              q->cellify ();
             }
         }
 
       first_elem = true;
 
-      for (iterator p = begin (); p != end (); p++)
+      for (iterator q = begin (); q != end (); q++)
         {
           octave_quit ();
 
-          tm_row_const elt = *p;
+          tm_row_const elt = *q;
 
           octave_idx_type this_elt_nr = elt.rows ();
           octave_idx_type this_elt_nc = elt.cols ();
@@ -940,12 +938,10 @@
 {
   octave_value retval = Matrix ();
 
-  bool all_strings_p = false;
   bool all_sq_strings_p = false;
   bool all_dq_strings_p = false;
   bool all_empty_p = false;
   bool all_real_p = false;
-  bool all_complex_p = false;
   bool any_sparse_p = false;
   bool any_class_p = false;
   bool frc_str_conv = false;
@@ -955,12 +951,10 @@
   if (tmp && ! tmp.empty ())
     {
       dim_vector dv = tmp.dims ();
-      all_strings_p = tmp.all_strings_p ();
       all_sq_strings_p = tmp.all_sq_strings_p ();
       all_dq_strings_p = tmp.all_dq_strings_p ();
       all_empty_p = tmp.all_empty_p ();
       all_real_p = tmp.all_real_p ();
-      all_complex_p = tmp.all_complex_p ();
       any_sparse_p = tmp.any_sparse_p ();
       any_class_p = tmp.any_class_p ();
       frc_str_conv = tmp.some_strings_p ();