diff src/pt-pr-code.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 12df7854fa7c
children 027a2186cd90
line wrap: on
line diff
--- a/src/pt-pr-code.cc
+++ b/src/pt-pr-code.cc
@@ -529,16 +529,10 @@
 
   print_parens (expr, "(");
 
-  bool expr_has_parens = false;
-
   tree_expression *e = expr.expression ();
 
   if (e)
-    {
-      e->accept (*this);
-
-      expr_has_parens = e->is_postfix_indexed ();
-    }
+    e->accept (*this);
 
   std::list<tree_argument_list *> arg_lists = expr.arg_lists ();
   std::string type_tags = expr.type_tags ();