User Activity

  • Posted a comment on discussion Development on cppcheck

    For example: template<typename Word, size_t NumWords, typename Enable = typename std::enable_if<sizeof(Word) < sizeof(word_t)>::type > Cppcheck will calculate the number of '<' and '>'. However, this symbol in 'sizeof(Word) < sizeof(word_t)' means less-than sign, and cppcheck still think it is 'garbage templates'. /cppcheck-1.85/lib/tokenize.cpp void Tokenizer::findGarbageCode() const { ... // Garbage templates.. if (isCPP()) { for (const Token *tok = tokens(); tok; tok = tok->next()) { if (!Token::simpleMatch(tok,...

  • Posted a comment on discussion General Discussion on cppcheck

    Thank you very much. I didn't add --inconclusive, but I still have a question as to why the official example also adds --inconclusive, as if this is an indeterminate parameter. Why is it necessary to add this parameter correctly?

  • Modified a comment on discussion General Discussion on cppcheck

    Hello, We used cppcheck to test the example provided by itself, but there is no error that should exist. What is the cause of this? I sincerely hope to get your reply. Here is the file without error: testbool.cpp #line 726 testbool.cpp #line 756 testfunction.cpp #line 842 testother.cpp #line 2696 testother.cpp #line 3325 testother.cpp #line 4359 testother.cpp #line 4688 testsizeof.cpp #line 410 testsizeof.cpp #line 390 testother.cpp #line 5329 E.g: <error id="suspiciousCase" severity="warning" msg="Found...

  • Posted a comment on discussion General Discussion on cppcheck

    Hello, We used cppcheck to test the example provided by itself, but there is no error that should exist. What is the cause of this? I sincerely hope to get your reply. E.g: <error id="suspiciousCase" severity="warning" msg="Found suspicious case label in switch(). Operator '||' probably doesn't work as intended." verbose="Using an operator like '||' in a case label is suspicious. Did you intend to use a bitwise operator, multiple case labels or if/else instead?" cwe="398" inconclusive="true"/> code:...

  • Posted a comment on discussion General Discussion on cppcheck

    Thank you very much!

  • Modified a comment on discussion General Discussion on cppcheck

    #include <iostream> #include <vector> #include <boost/algorithm/string.hpp> using namespace std; using namespace boost; int main() { int ss[3]; ss[4]=0; //out of bounds string str("readme.txt"); if (ends_with(str, " txt")) { cout << to_upper_copy(str) + "UPPER" << endl; // upper case } replace_first(str, "readme ", "followme "); // replace cout << str << endl; vector<char> v(str.begin(), str.end()); vector<char> v2 = to_upper_copy(erase_first_copy(v, "txt ")); // delete sub string for (int i = 0;...

  • Modified a comment on discussion General Discussion on cppcheck

    #include <iostream> #include <vector> #include <boost/algorithm/string.hpp> using namespace std; using namespace boost; int main() { int ss[3]; ss[4]=0; //out of bounds string str("readme.txt"); if (ends_with(str, " txt")) { cout << to_upper_copy(str) + "UPPER" << endl; // upper case } replace_first(str, "readme ", "followme "); // replace cout << str << endl; vector<char> v(str.begin(), str.end()); vector<char> v2 = to_upper_copy(erase_first_copy(v, "txt ")); // delete sub string for (int i = 0;...

  • Modified a comment on discussion General Discussion on cppcheck

    #include <iostream> #include <vector> #include <boost/algorithm/string.hpp> using namespace std; using namespace boost; int main() { int ss[3]; ss[4]=0; //out of bounds string str("readme.txt"); if (ends_with(str, " txt")) { cout << to_upper_copy(str) + "UPPER" << endl; // upper case } replace_first(str, "readme ", "followme "); // replace cout << str << endl; vector<char> v(str.begin(), str.end()); vector<char> v2 = to_upper_copy(erase_first_copy(v, "txt ")); // delete sub string for (int i = 0;...

View All

Personal Data

Username:
gutaoming
Joined:
2018-04-12 01:50:04

Projects

  • No projects to display.

Personal Tools