changeset 21000:85dfb551e4cd

maint: Periodic merge of stable to default.
author Rik <rik@octave.org>
date Mon, 28 Dec 2015 09:00:05 -0800
parents 73f62b4bb533 (current diff) 8281e37a5631 (diff)
children 1c91ff4cf9ec
files libinterp/corefcn/error.cc scripts/help/__makeinfo__.m scripts/plot/util/private/__gnuplot_draw_axes__.m
diffstat 1 files changed, 11 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/libinterp/corefcn/error.cc	Mon Dec 28 08:40:05 2015 -0800
+++ b/libinterp/corefcn/error.cc	Mon Dec 28 09:00:05 2015 -0800
@@ -1340,12 +1340,6 @@
 static void
 set_warning_option (const std::string& state, const std::string& ident)
 {
-  if (ident == "all")
-    {
-      initialize_warning_options (state);
-      return;
-    }
-
   std::string all_state = default_warning_state ();
 
   if (state != "on" && state != "off" && state != "error")
@@ -1558,8 +1552,10 @@
               nargin--;
             }
 
-          if (arg2 == "all")
+          if (nargin >= 2 && arg2 == "all")
             {
+              // If "all" is explicitly given as ID.
+
               octave_map tmp;
 
               Cell id (1, 1);
@@ -1745,6 +1741,14 @@
   return retval;
 }
 
+/*
+## Test for (bug #45753)
+
+%!test
+%! warning ("error");
+%! assert (! isempty (help ("warning")));
+*/
+
 octave_value_list
 set_warning_state (const std::string& id, const std::string& state)
 {