# HG changeset patch # User John W. Eaton # Date 1323796610 18000 # Node ID 57e19c30b7d6f6900c2e1b94c5788452eb81426f # Parent 6cb6e390e58c3565aa6fe384e0a3757afdf0432a 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. diff -r 6cb6e390e58c -r 57e19c30b7d6 src/error.cc --- 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) {