bugGNU Octave - Bugs: bug #62017, 5 warnings on unused variables...

 
 

bug #62017: 5 warnings on unused variables detected by clang 13

Submitter:  A.R. Burgers <arb>
Submitted:  Thu 10 Feb 2022 08:27:09 AM UTC
   
 
Category:  Interpreter Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Missed Error or Warning
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * dev Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Sat 12 Feb 2022 05:55:17 PM UTC, comment #2: 

I combined the patches, except for the one about LED color (b62017_lambda.cset) which seems already to have been applied on the development branch.  I checked them in as one cset under your name here: http://hg.savannah.gnu.org/hgweb/octave/rev/4335606e41ac.

Marking as fixed and closing report.

Rik <rik5>
Group administrator
Thu 10 Feb 2022 03:42:19 PM UTC, comment #1: 

Are you sure clang is correct about these instances?

I took one example, m_debug_frame, and using grep it is certainly used in several locations in the code.  On the other hand, the same variable name "m_debug_frame" seems to be a private member variable of both the tree_evaluator class and the debugger class.  That's pretty confusing.  Maybe clang has it right and that m_debug_frame should be deleted from the debugger class.  Or maybe this has uncovered a larger error and m_debug_frame should be removed from the tree_evaluator class instead.  Add jwe to the CC list for this question.

I haven't looked at any of the others.

Rik <rik5>
Group administrator
Thu 10 Feb 2022 08:27:09 AM UTC, original submission:  

clang 13 reports multiple unused variables:


libinterp/parse-tree/oct-lvalue.h:110:21: warning: private field 'm_nel' is not used [-Wunused-private-field]
libinterp/parse-tree/pt-eval.cc:137:17: warning: private field 'm_debug_frame' is not used [-Wunused-private-field]
libinterp/corefcn/oct-stream.cc:6597:17: warning: variable 'char_count' set but not used [-Wunused-but-set-variable]
liboctave/util/str-vec.cc:247:23: warning: variable 'pos' set but not used [-Wunused-but-set-variable]
libgui/src/m-editor/octave-qscintilla.cc:1038:9: warning: lambda capture 'this' is not used [-Wunused-lambda-capture]


changesets coming

A.R. Burgers <arb>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #52835:  b62017_str_vec_pos.cset added by arb (964B - application/octet-stream)
file #52831:  b62017_char_count.cset added by arb (1KiB - application/octet-stream)
file #52832:  b62017_m_debug_frame.cset added by arb (1KiB - application/octet-stream)
file #52833:  b62017_lambda_this.cset added by arb (919B - application/octet-stream)
file #52834:  b62017_m_nel.cset added by arb (693B - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by rik5
  • -email is unavailable- added by arb (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 8 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2022-02-12 rik5 StatusNone Fixed
        Open/ClosedOpen Closed
    2022-02-10 rik5 Carbon-Copy- Added jwe
    2022-02-10 arb Attached File- Added b62017_str_vec_pos.cset, #52835
    2022-02-10 arb Attached File- Added b62017_char_count.cset, #52831
        Attached File- Added b62017_m_debug_frame.cset, #52832
        Attached File- Added b62017_lambda_this.cset, #52833
        Attached File- Added b62017_m_nel.cset, #52834

    Back to the top

    Powered by Savane 3.13-4b48.
    Corresponding source code