bugGNU Octave - Bugs: bug #47773, Using depracated octave_idx_type...

 
 

bug #47773: Using depracated octave_idx_type Array<T>::length() in lo-sysdep.cc

Submitter:  Avinoam Kalma <avinoam>
Submitted:  Sun 24 Apr 2016 08:28:17 AM UTC
   
 
Category:  Configuration and Build System Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Other
Status:  Fixed Assigned to:  None
Originator Name:  Avinoam Open/Closed:  * Closed
Release:  * dev Operating System:  * GNU/Linux
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Sun 24 Apr 2016 11:46:53 PM UTC, comment #3: 

Thanks Lachlan, this is a good easy fix.  I checked it in here (http://hg.savannah.gnu.org/hgweb/octave/rev/da9c75ffd1a3).

I took a look through the other instances of length() in liboctave and they are okay.  I do see room for improvement which is to replace dv.length () with dv.ndims () for clarity.  But that is unrelated.

Rik <rik5>
Group administrator
Sun 24 Apr 2016 05:28:28 PM UTC, comment #2: 

As it is a mere warning, is it really important to fix urgently?

Philip Nienhuis <philipnienhuis>
Group Member
Sun 24 Apr 2016 01:18:32 PM UTC, comment #1: 

The change seems trivial (attached), though I'm not set up to run MXE-octave to check it.

I'm not sure of a fast way to check if there are other cases in conditionally compiled code.

(file #36988)

Lachlan Andrew <lachlan>
Sun 24 Apr 2016 08:28:17 AM UTC, original submission:  


When compiling MXE-Octave I get the warning:


/home/avinoam/mxe-octave/tmp-default-octave/octave-4.1.0+/liboctave/system/lo-sysdep.cc:130:32: warning: 'octave_idx_type Array<T>::length() const [with T = std::basic_string<char>; octave_idx_type = int]' is deprecated (declared at /home/avinoam/mxe-octave/tmp-default-octave/octave-4.1.0+/liboctave/array/Array.h:265): use 'numel' instead [-Wdeprecated-declarations]
   for (int k=1; k<args.length (); k++)


                                ^

Avinoam Kalma <avinoam>
Group Member

 

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

Attach Files:
   
   
Comment:
   

Attached Files

 

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 lachlan (Updated the item)
  • -email is unavailable- added by avinoam (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 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2016-04-24 rik5 StatusPatch Submitted Fixed
        Open/ClosedOpen Closed
    2016-04-24 lachlan Attached File- Added bug_47773_deprecated_length.cset, #36988
        StatusNone Patch Submitted

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code