bugGNU Octave - Bugs: bug #56203, "empty-index" warning in...

 
 

bug #56203: "empty-index" warning in containers.Map

Submitter:  Guillaume <gyom>
Submitted:  Wed 24 Apr 2019 08:39:07 AM UTC
   
 
Category:  Octave Function Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Missed Error or Warning
Status:  Fixed Assigned to:  None
Originator Name:  Guillaume Open/Closed:  * Closed
Release:  * dev Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Wed 24 Apr 2019 03:29:52 PM UTC, comment #1: 

I checked in the change under your name here (https://hg.savannah.gnu.org/hgweb/octave/rev/9cf1a1732201).

Marking as fixed and closing report.

Rik <rik5>
Group administrator
Wed 24 Apr 2019 08:39:07 AM UTC, original submission:  

A small fix is needed in containers.Map to get rid of the warning that appeared since https://hg.savannah.gnu.org/hgweb/octave/rev/d61825e693f2
from bug #56167, comment #16


--- a/scripts/+containers/Map.m Mon Apr 22 21:53:52 2019 -0700
+++ b/scripts/+containers/Map.m Tue Apr 23 15:34:34 2019 +0100
@@ -376,6 +376,9 @@
             otherwise
               error ("containers.Map: unknown property '%s'", s(1).subs);
           endswitch
+          if (numel (s) > 1 && strcmp (s(2).type, "()") && isempty (s(2).subs))
+            s(1) = [];
+          endif
         case "()"
           if (isempty (s(1).subs))
             error ("containers.Map: no key specified");


Guillaume <gyom>

 

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

Attach Files:
   
   
Comment:
   

No files currently attached

 

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 gyom (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 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2019-04-24 rik5 StatusNone Fixed
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-4b48.
    Corresponding source code