diff options
author | Mark Wielaard <mwielaard@redhat.com> | 2008-06-11 18:30:57 +0200 |
---|---|---|
committer | Mark Wielaard <mwielaard@redhat.com> | 2008-06-11 18:30:57 +0200 |
commit | 005b8a330592b0a4a9bfc2b46c222e8bf1c18753 (patch) | |
tree | ba4e63c559ecb9f327c1005d96c6d1a0ce955a3a | |
parent | 20fb5020388d8ef57777f5e75a2430f2ee15cac3 (diff) | |
download | systemtap-steved-005b8a330592b0a4a9bfc2b46c222e8bf1c18753.tar.gz systemtap-steved-005b8a330592b0a4a9bfc2b46c222e8bf1c18753.tar.xz systemtap-steved-005b8a330592b0a4a9bfc2b46c222e8bf1c18753.zip |
Micro-optimize print_warning output. Fix warnings.exp line count.
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | elaborate.cxx | 3 | ||||
-rw-r--r-- | session.h | 2 | ||||
-rw-r--r-- | testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | testsuite/systemtap.base/warnings.exp | 2 |
5 files changed, 14 insertions, 4 deletions
@@ -1,3 +1,9 @@ +2008-06-11 Mark Wielaard <mwielaard@redhat.com> + + * elaborate.cxx (print_warning): Only output WARNING, don't put it + in the message_str and seen_warnings. + * session.h (print_waring): Reindent. + 2008-06-11 Frank Ch. Eigler <fche@elastic.org> * elaborate.cxx (print_warning): Use session.seen_warnings[]. diff --git a/elaborate.cxx b/elaborate.cxx index eb68a52a..d0665c90 100644 --- a/elaborate.cxx +++ b/elaborate.cxx @@ -1231,12 +1231,11 @@ systemtap_session::print_error (const semantic_error& e) void systemtap_session::print_warning (string message_str) { - message_str.insert(0, "WARNING: "); // Duplicate elimination if (seen_warnings.find (message_str) == seen_warnings.end()) { seen_warnings.insert (message_str); - clog << message_str << endl; + clog << "WARNING: " << message_str << endl; } } @@ -167,7 +167,7 @@ struct systemtap_session unsigned num_errors () { return seen_errors.size(); } // void print_error (const parse_error& e); void print_error (const semantic_error& e); - void print_warning (std::string w); + void print_warning (std::string w); // reNB: new POD members likely need to be explicitly cleared in the ctor. }; diff --git a/testsuite/ChangeLog b/testsuite/ChangeLog index 1fd4c0e6..9fe8b8e3 100644 --- a/testsuite/ChangeLog +++ b/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2008-06-11 Mark Wielaard <mwielaard@redhat.com> + + * systemtap.base/warnings.exp: Expect 11 warning plus 1 .ko output + line. + 2008-06-11 David Smith <dsmith@redhat.com> * systemtap.base/utrace_p5.exp: Made changes to work when not diff --git a/testsuite/systemtap.base/warnings.exp b/testsuite/systemtap.base/warnings.exp index 072b52fb..99e70847 100644 --- a/testsuite/systemtap.base/warnings.exp +++ b/testsuite/systemtap.base/warnings.exp @@ -9,7 +9,7 @@ expect { eof { } } wait -if {$ok == 11} { +if {$ok == 12} { pass $test } else { fail "$test ($ok)" |