octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #56203] "empty-index" warning in containers.Ma


From: Guillaume
Subject: [Octave-bug-tracker] [bug #56203] "empty-index" warning in containers.Map
Date: Wed, 24 Apr 2019 04:39:08 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/60.0

URL:
  <https://savannah.gnu.org/bugs/?56203>

                 Summary: "empty-index" warning in containers.Map
                 Project: GNU Octave
            Submitted by: gyom
            Submitted on: 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: None
             Assigned to: None
         Originator Name: Guillaume
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: dev
        Operating System: Any

    _______________________________________________________

Details:

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");






    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?56203>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]