|
From: | Andrew Janke |
Subject: | [Octave-bug-tracker] [bug #55935] Useless "new_sid->m_name; " in octave::symbol_scope_rep::dup |
Date: | Sat, 16 Mar 2019 09:31:33 -0400 (EDT) |
User-agent: | Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.75 Safari/537.36 |
URL: <https://savannah.gnu.org/bugs/?55935> Summary: Useless "new_sid->m_name;" in octave::symbol_scope_rep::dup Project: GNU Octave Submitted by: apjanke Submitted on: Sat 16 Mar 2019 01:31:31 PM UTC Category: Interpreter Severity: 3 - Normal Priority: 5 - Normal Item Group: Other Status: None Assigned to: None Originator Name: Originator Email: Open/Closed: Open Discussion Lock: Any Release: dev Operating System: Any _______________________________________________________ Details: In libinterp/corefcn/symscope.h at line 120: std::shared_ptr<symbol_scope_rep> dup (void) const { std::shared_ptr<symbol_scope_rep> new_sid = std::shared_ptr<symbol_scope_rep> (new symbol_scope_rep (m_name)); new_sid->m_name; That "new_sid->m_name;" statement is a no-op, I think. Should it actually be initialized from this's m_name? Or some other source? Causes a warning in clang: In file included from ../../octave/libinterp/corefcn/errwarn.cc:27: In file included from ../../octave/libinterp/corefcn/defun.h:32: In file included from ../../octave/libinterp/corefcn/defun-int.h:30: In file included from ../../octave/libinterp/octave-value/ov-builtin.h:32: In file included from ../../octave/libinterp/octave-value/ov-fcn.h:36: ../../octave/libinterp/corefcn/symscope.h:120:16: warning: expression result unused [-Wunused-value] new_sid->m_name; ~~~~~~~ ^~~~~~ _______________________________________________________ Reply to this item at: <https://savannah.gnu.org/bugs/?55935> _______________________________________________ Message sent via Savannah https://savannah.gnu.org/
[Prev in Thread] | Current Thread | [Next in Thread] |