changeset 14042:57e19c30b7d6 stable

assume "all" "on" if "all" is not present in warning_state structure (bug #35050) * error.cc (warning_enabled): If all_state is still -1 after looking at the warning state structure, set it to 1 instead of having a panic attack.
author John W. Eaton <jwe@octave.org>
date Tue, 13 Dec 2011 12:16:50 -0500
parents 6cb6e390e58c
children f913363318e0
files src/error.cc
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/error.cc	Mon Dec 12 23:05:08 2011 -0800
+++ b/src/error.cc	Tue Dec 13 12:16:50 2011 -0500
@@ -552,7 +552,8 @@
 }
 
 // For given warning ID, return 0 if warnings are disabled, 1 if
-// enabled, and 2 if this ID should be an error instead of a warning.
+// enabled, and 2 if the given ID should be an error instead of a
+// warning.
 
 int
 warning_enabled (const std::string& id)
@@ -598,8 +599,9 @@
         }
     }
 
+  // If "all" is not present, assume warnings are enabled.
   if (all_state == -1)
-    panic_impossible ();
+    all_state = 1;
 
   if (all_state == 0)
     {