diff options
author | Jose <jose@zeroc.com> | 2009-02-16 23:33:15 +0100 |
---|---|---|
committer | Jose <jose@zeroc.com> | 2009-02-16 23:33:15 +0100 |
commit | d34e73a218a110be1b4808d181e3c40499af33b2 (patch) | |
tree | cc56693d671fc94c1f0e1c9a77ff90d1a46081bc /cpp/src/Slice/Util.cpp | |
parent | bug 3733 - remove Connector.CompareTo in C# (diff) | |
download | ice-d34e73a218a110be1b4808d181e3c40499af33b2.tar.bz2 ice-d34e73a218a110be1b4808d181e3c40499af33b2.tar.xz ice-d34e73a218a110be1b4808d181e3c40499af33b2.zip |
Bug 3715 - filterMcppWarnings not handle all cases
Diffstat (limited to 'cpp/src/Slice/Util.cpp')
-rw-r--r-- | cpp/src/Slice/Util.cpp | 35 |
1 files changed, 34 insertions, 1 deletions
diff --git a/cpp/src/Slice/Util.cpp b/cpp/src/Slice/Util.cpp index 867f25dcf66..1ca06773b86 100644 --- a/cpp/src/Slice/Util.cpp +++ b/cpp/src/Slice/Util.cpp @@ -263,6 +263,10 @@ Slice::filterMcppWarnings(const string& message) 0 }; + static const string warningPrefix = "warning:"; + static const string fromPrefix = "from"; + static const string separators = "\n\t "; + vector<string> in; vector<string> out; IceUtilInternal::splitString(message, "\n", in); @@ -270,7 +274,7 @@ Slice::filterMcppWarnings(const string& message) for(vector<string>::const_iterator i = in.begin(); i != in.end(); i++) { skiped = false; - static const string warningPrefix = "warning:"; + if(i->find(warningPrefix) != string::npos) { for(int j = 0; messages[j] != 0; ++j) @@ -282,9 +286,38 @@ Slice::filterMcppWarnings(const string& message) // produces the skiped warning i++; skiped = true; + // + // Check if next lines are still the same warning + // + i++; + while(i != in.end()) + { + string token = *i; + string::size_type index = token.find_first_not_of(separators); + if(index != string::npos) + { + token = token.substr(index); + } + if(token.find(fromPrefix) != 0) + { + // + // First line not of this warning + // + i--; + break; + } + else + { + i++; + } + } break; } } + if(i == in.end()) + { + break; + } } if(!skiped) { |