Mercurial > hg > octave-lyh
diff src/error.cc @ 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 | 2c0765c14e4f |
children | 4000ad5fe0f6 |
line wrap: on
line diff
--- a/src/error.cc +++ b/src/error.cc @@ -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) {