Daniel Marjamäki
57004ed533
Fixed #7663 (False positive: uninitialized variable (multi variables in inner scopes))
2017-09-07 23:08:55 +02:00
Ayaz Salikhov
28aa939d69
iwyu - include what you use
2017-05-27 04:33:47 +02:00
Daniel Marjamäki
8a738eefab
fixed #7998 (uninitialized variable is not found when used with switch/case)
2017-04-23 18:05:14 +02:00
Daniel Marjamäki
633ed23c0d
Fix Cppcheck warnings about mismatching function argument names
2017-04-01 09:31:27 +02:00
Daniel Marjamäki
d79688c40b
Fixed #7822 (False positive for uninitialized variable if array type is used)
2016-12-21 23:11:11 +01:00
amai2012
eba1b0881d
Minor refactoring: use nullptr (instead of 0/NULL), change signature of Tokenizer::createTokens
2016-05-07 16:30:54 +02:00
Lauri Nurmi
996c9244d8
Update copyright year to 2007-2016.
2016-01-01 15:34:45 +02:00
Daniel Marjamäki
0f9d90d2be
Changed Copyrights. Removed my name.
2015-11-18 20:04:50 +01:00
Daniel Marjamäki
234669b02b
Removed the UninitVar::analyseFunctions(). This was written for multifile checking however it did not work as it should => no multifile errors can be detected.
2015-07-24 08:30:38 +02:00
PKEuS
795e5de903
Refactorization: Cleaned up after ExecutionPath removal
2015-07-23 20:37:09 +02:00
Daniel Marjamäki
ea933e9873
CheckUninitVar: Removed ExecutionPath based checker
2015-07-23 17:28:18 +02:00
Daniel Marjamäki
0b81a267f4
uninitvar: handling arrays in non-executionpath checker
2015-07-23 14:51:38 +02:00
Daniel Marjamäki
79067ac031
uninitvar: use new checking instead of executionpath in more tests. small improvements in new checking to fix testcases.
2015-07-23 08:46:59 +02:00
amai2012
1604e751e5
Fix some compiler warnings which got introduced recently
2015-06-30 20:11:51 +02:00
Daniel Marjamäki
02df692b0b
Fixed #4760 (false negative: (error) usage of uninitialized variable (struct member))
2015-06-19 18:21:46 +02:00
PKEuS
ee046af20c
Fixed false positives #6450 and #6451
2015-01-23 19:38:39 +01:00
PKEuS
4c76f71499
Reactivated old uninitialized variable checker which I accidentially disabled in previous commit
2015-01-22 17:34:22 +01:00
PKEuS
f4d11a4209
Fixed false negatives on try and non-executable scopes in checkUninitVar, removed unnecessary function parameters
2015-01-22 13:55:19 +01:00
PKEuS
d8e282fe76
Refactorization: Made checkUninitVar::isVariableUsage() non-static
2015-01-21 13:52:03 +01:00
Daniel Marjamäki
ff11ba9847
Updated copyright year to 2015
2015-01-03 12:14:58 +01:00
Daniel Marjamäki
0b9d80c95d
Refactoring CheckUnusedFunctions so it uses new infrastructure for multifile analysis
2014-12-02 06:41:18 +01:00
Daniel Marjamäki
a002654c47
Reverted refactoring 828417c
for now. It caused a major slowdown in the unused functions checking.
2014-11-24 06:37:08 +01:00
Daniel Marjamäki
051d42ae6b
astyle formatting
2014-11-20 14:20:09 +01:00
orbitcowboy
f5d804f71a
running astyle
2014-11-20 10:13:03 +01:00
Daniel Marjamäki
828417c934
CheckUnusedFunction: Refactorings to use same infrastructure for whole program analysis as CheckUninitVar and CheckBufferOverrun
2014-11-15 18:44:23 +01:00
Daniel Marjamäki
de7e9223b8
Fixed #6272 (Improve check: multifile checking in checkbufferoverrun)
2014-11-15 10:43:49 +01:00
Daniel Marjamäki
fbc6323a9b
doc: changed --doc output to Markdown syntax
2014-09-30 14:56:12 +02:00
Daniel Marjamäki
a2f776b1b7
Dead pointer: Added checking for dead pointer usage when pointer alias local variable that has gone out of scope.
2014-08-05 06:24:23 +02:00
PKEuS
8f79dc3ff8
Cleaned up includes and forward declarations in checkers:
...
- Removed definitely unnecessary forward declarations (e.g. "class Token"; token.h is already included by check.h, so a definition is unnecessary)
- Removed unused includes
2014-05-24 12:50:03 +02:00
Daniel Marjamäki
fd3a8a2a18
Update copyright
2014-02-15 07:45:39 +01:00
Daniel Marjamäki
be5c00d215
Uninitialized variables: check function arguments
2013-12-09 15:58:42 +01:00
Daniel Marjamäki
14a00046a3
Fixed #5207 (Struct uninitialized members useage is not giving error (malloc).)
2013-12-04 20:32:20 +01:00
Ettl Martin
9ab6655d85
Fixed #5007 (Same include guard naming)
2013-09-04 20:59:49 +02:00
PKEuS
a9a5dc0354
Updated to AStyle 2.03, require this version
2013-08-07 16:27:37 +02:00
Alexander Mai
7a324cef25
Fixed various Cppcheck inconclusive warnings
2013-07-30 12:52:27 +02:00
Daniel Marjamäki
2a1af1acda
CheckUninitVar: Assertion for '} while (' after 'do {..' in debug builds. Bail out in release builds to avoid segfaults.
2013-07-28 12:41:38 +02:00
Daniel Marjamäki
ba23b65179
Fixed #4885 (FP Uninitialized variable when using comma)
2013-06-29 09:33:51 +02:00
PKEuS
292e52364c
Refactorizations:
...
- Removed empty implementation of CheckUninitVar::runChecks()
- Avoided unnecessary string copying
2013-03-12 08:11:18 -07:00
Daniel Marjamäki
442db6cdf9
Fixed #4569 (False Positive: Uninitialised variable)
2013-02-11 18:31:14 +01:00
Daniel Marjamki
9c8d600ca9
Uninitialized variables: Refactor CheckUninitVar::isVariableUsage
2013-02-02 15:21:54 +01:00
Robert Reif
859793731d
SymbolDatabase: Refactor findFunction handling. Ticket: #4494
2013-01-28 06:47:48 +01:00
Daniel Marjamäki
c235737b6c
Uninitialized variables: improved checking of loops
2013-01-24 19:41:15 +01:00
Daniel Marjamki
f1c195e652
Fixed #3506 (false negative: not initialized variables ( struct timeval))
2013-01-19 12:48:56 +01:00
Daniel Marjamäki
2c6b383822
Uninitialized member variables: Improvements
2013-01-17 21:04:22 +01:00
Daniel Marjamäki
5773e69ab1
Uninitialized variables: Add experimental checking of struct members
2013-01-16 20:28:29 +01:00
Andrew C. Martin
4a73c93750
Fix compiler warnings and comment/string typos
...
- fix g++ warning:
> lib/checkother.cpp:3779: warning: comparison between signed and unsigned integer expressions
- fix suncc warning (see [everything2](http://everything2.com/title/C%252B%252B%253A+static+extern+%2522C%2522 )):
> "lib/checkmemoryleak.cpp", line 578: Warning (Anachronism): Formal argument __compar of type extern "C" int(*)(const void*,const void*) in call to bsearch(const void*, const void*, unsigned long, unsigned long, extern "C" int(*)(const void*,const void*)) is being passed int(*)(const void*,const void*).
- prefer empty() / isEmpty() over "size() > 0" (cases not caught by stlSize)
- fix word misspellings (mostly comments, a few output lines)
- Parenthesis => Parentheses (both variations were used in the codebase)
- fix typo and wording ("never alwayw") in gui/test/data/benchmark/simple.cpp's CheckOther::unsignedPositive():
```
- "An unsigned variable will never alwayw be positive so it is either pointless or "
+ "An unsigned variable can't be negative so it is either pointless or "
```
2013-01-16 07:37:07 -07:00
Reijo Tomperi
5d5f7085bf
Updating year 2012 -> 2013 to .cpp and .h files and man page.
2013-01-01 18:29:08 +02:00
Daniel Marjamäki
ccdea4dc2b
Uninitialized variables: Improved checking of functions
2012-12-20 19:45:30 +01:00
Daniel Marjamäki
68327b3c64
Uninitialized variables: Fixed TODO testcase
2012-11-29 18:41:48 +01:00
XhmikosR
6e4e3dfbfb
lib: tabs to spaces, remove trailing spaces and extra empty lines at the end of files
2012-09-17 13:51:23 +02:00
PKEuS
1b40668e04
Refactorizations:
...
- Made several functions (Check*::myName and others) because they don't touch depend on a specific instance. (cppcheck findings)
- Removed description of a check in CheckConst that has moved to CheckIO
2012-08-02 09:50:48 -07:00
PKEuS
4b80e91145
Implemented support for building cppcheck lib into a dll
...
Updated VS9 solution
New VS10 solution that builds cppcheck into a dll used by cli and testrunner.
Functional changes and advantages of new solution:
- Share code between testrunner and cli; ability to share code with gui as well (not yet implemented)
- Files of /lib are no longer compiled twice (should improve build time on single core machines)
- Added configuration for building with PCRE support
- Executables are build into /bin (/bin/debug in debug mode) folder (Should no longer require rebuild when switching between debug and release)
- Completely x64 compatible (contains also x64-debug configuration now)
2012-06-10 05:19:09 -07:00
PKEuS
79445e52ad
Refactorized CheckUninitVar to use SymbolDatabase
2012-05-25 04:40:18 -07:00
PKEuS
b37cf11d20
Refactorizations:
...
- Increased encapsulation by making some functions private
- Removed redundant function CheckBufferOverrun::ArrayInfo::declare
- Avoided copy of ArrayInfo object
- Removed unnecessary and suspicious "if(sizeof(int) == 4)"
2012-03-27 19:40:39 +02:00
PKEuS
b1ff900aaa
Some refactorizations
2012-02-18 23:43:51 +01:00
Reijo Tomperi
8cae17fda8
Update year to 2012
2012-01-01 01:05:37 +02:00
Daniel Marjamäki
5aaec7adc5
Uninitialized variables: Better handling of variable usage in condition
2011-12-26 18:56:40 +01:00
Daniel Marjamäki
59cd099ba7
Uninitialized variables: Fixed false positives caused by recent commit when potentially uninitialized variable is read in condition
2011-12-26 18:32:42 +01:00
Daniel Marjamäki
8eb067358c
Uninitialized variables: check more variables
2011-12-26 14:01:46 +01:00
Daniel Marjamäki
f48edb63a3
Uninitialized variables: Improved checking when there are multiple if/else and a certain path causes an error
2011-12-26 12:36:35 +01:00
Daniel Marjamäki
8e3e634ce0
Uninitialized variables: Detect more errors. Ticket: #3369
2011-12-14 18:28:30 +01:00
Daniel Marjamäki
458fa0874a
Uninitialized variables: Started writing a new check. Ticket: #3369
2011-12-13 21:57:27 +01:00
Daniel Marjamäki
6f8e42a5af
changed the astyle formatting flags
2011-10-13 20:53:06 +02:00
Daniel Marjamäki
c7d0beefa8
uninitstring: fix false negatives when non-zero memset is used. Ticket: #3050
2011-09-05 19:42:48 +02:00
Greg Hewgill
be195a72c9
initialise Check::_name in constructor rather than relying on virtual Check::name()
2011-02-02 22:58:25 +13:00
Reijo Tomperi
226b605774
Change year 2010 -> 2011 in license texts.
2011-01-09 21:33:36 +02:00
Daniel Marjamäki
38e7209d26
Fixed #2373 (Using XML2 in --errorlist output)
2010-12-29 12:43:29 +01:00
Daniel Marjamäki
bc283d8b99
Uninitialized variables: Broke out the checking into separate file
2010-10-31 12:31:11 +01:00