Commit Graph

23 Commits

Author SHA1 Message Date
Daniel Marjamäki 474fed453e memleak: Fixed false negative for sample 2019-08-18 19:45:39 +02:00
Daniel Marjamäki b2e66a23e7 Fix TestSamples 2019-08-18 17:45:23 +02:00
Daniel Marjamäki d95f29b23a Fixed test/cli 2019-08-18 12:51:32 +02:00
Daniel Marjamäki 6431d1c58a cli: Change default --template format, Cppcheck will now use the gcc template by default. Added --template=cppcheck1 format. 2019-08-18 07:50:50 +02:00
Paul Fultz II a08a9c1349 Switch to use lifetime analysis for iterators and pointers to invalid containers
This will diagnose more issues such as:

```cpp
void f(std::vector<int> &v) {
    auto v0 = v.begin();
    v.push_back(123);
    std::cout << *v0 << std::endl;
}
```
2019-07-18 10:56:44 +02:00
Daniel Marjamäki 92485245ce Restore severity for 'autoVariables' 2019-03-15 15:13:11 +01:00
Daniel Marjamäki 3656f1ae4f Auto variables: Fix false negatives for normal tokens 2019-03-14 13:51:35 +01:00
Daniel Marjamäki 615903c6be Improve syntax errors for unmatched (){}[] 2019-01-05 11:56:21 +01:00
Daniel Marjamäki 0b4e08cac9 Use FwdAnalysis in UnusedVar. This is still work-in-progress. Merging to master branch so it can be tested. 2018-12-13 18:52:56 +01:00
Ayaz Salikhov bddc698295 Make warning disappear (#957) 2017-09-08 14:25:08 +02:00
PKEuS 084fcc936c Rephrased syntaxError message for empty configurations to improve readability:
Old: Invalid number of character 'c' when these macros are defined: ''.
New: Invalid number of character 'c' when no macros are defined.
2016-08-04 16:28:11 +02:00
Daniel Marjamäki 03d2829fb9 Merge simplecpp branch 2016-07-20 12:21:00 +02:00
Matthias Krüger 83ee640977 Tokenizer::syntaxError: put the character that we have an invalid number of into singlequotes instead of parentheses. 2015-07-31 15:28:59 +02:00
Alexander Mai fd7d29447d std.cfg: snprintf(NULL,0,) is legal. Fix some testcases in test/cfg as well 2015-02-22 14:25:25 +01:00
Daniel Marjamäki 2d21eb07ba Cleaned up snprintf hardcoding in CheckBufferOverrun 2015-02-13 06:44:38 +01:00
Daniel Marjamäki 6c8558c112 CheckBufferOverrun: Removed old for-loop handling. This is handled through ValueFlow from now on. 2014-06-27 06:46:42 +02:00
PKEuS c078b3fced Added testing of samples/ to testrunner (#3515). 2014-03-28 13:06:38 +01:00
XhmikosR 602b5af307 cosmetics 2012-09-28 19:04:11 +02:00
XhmikosR 458b8ce2cc samples: separate code blocks, remove extra empty lines at the end of files 2012-09-22 12:57:36 +02:00
Reijo Tomperi 5c68b36cbc Remove binary file from samples 2012-01-22 16:17:38 +02:00
Reijo Tomperi f5c0bb822d Fixing #3515 (Add samples/id/good|bad.cpp)
http://sourceforge.net/apps/trac/cppcheck/ticket/3515
2012-01-22 16:14:13 +02:00
Reijo Tomperi 5bb956b0ff Fixing #3515 (Add samples/id/good|bad.cpp)
http://sourceforge.net/apps/trac/cppcheck/ticket/3515
2012-01-22 15:52:31 +02:00
Reijo Tomperi 3066bb3430 Start fixing #3515 (Add samples/id/good|bad.cpp)
http://sourceforge.net/apps/trac/cppcheck/ticket/3515
2012-01-17 23:03:21 +02:00