Daniel Marjamäki
fefd8529c6
Fixed #4007 (False positive: 'Possible null pointer dereference' when using short-circuit evaluation)
2012-10-07 19:06:49 +02:00
Daniel Marjamäki
c9c04f9691
Fixed #4038 (FP: possible null pointer dereference)
2012-09-23 09:20:16 +02:00
Daniel Marjamäki
ffd5c82b4f
Fixed #4118 (False null-pointer warning when check is indirect)
2012-09-18 19:16:28 +02:00
PKEuS
508e9394d3
Added some nullpointer-checks and removed some redundant ones based on VS2012 code analysis results.
2012-09-17 15:22:51 +02:00
PKEuS
547d3e94b2
Fixed some sign conversion messages from clang.
2012-09-16 16:41:15 +02:00
PKEuS
22a8e3f4e6
Replaced Tokenizer::getFunctionTokenByName() by SymbolDatabase::findFunctionByName(), which handles scopes slightly better.
2012-09-11 18:03:47 +02:00
PKEuS
a4b5824dec
New internal check: checkRedundantNextPrevious().
...
Fixed findings by new internal check
2012-09-07 12:36:40 +02:00
PKEuS
31e7e41098
Fixed and refactorized broken CheckNullPointer::CanFunctionAssignPointer():
...
- return true if parameter is passed by reference (fixes #4111 )
- Use symboldatabase
- Improved handling of inconclusive
2012-09-06 18:33:15 +02:00
PKEuS
839f7a32a4
It is ok to pass a nullpointer as first argument to mbstowcs and wcstombs, which then just return how long the buffer has to be to store the result.
2012-08-26 10:41:48 +02:00
PKEuS
c8773b891d
Refactorization: Make use of Token::scope() replacing certain indentation counters
2012-08-12 03:13:07 -07:00
PKEuS
31129aad40
Refactorizations in checknullpointer.cpp:
...
- Removed CheckNullPointer::nullPointerAfterLoop(), improved CheckNullPointer::nullPointerByCheckAndDeRef() to cover tests
- Enhanced CheckNullPointer::nullPointerByDeRefAndChec() to check also 'else if' and 'while'
2012-08-05 02:07:38 -07:00
PKEuS
25ecd3ed71
Message refactorization: checknullpointer.cpp
...
Removed a duplicate test in checknullpointer.cpp
2012-08-05 01:38:48 -07:00
PKEuS
643f3890b4
Fixed #4003 : tmpnam may be called with a nullpointer
2012-07-27 01:36:22 -07:00
Daniel Marjamäki
a733c9b603
Fixed #3914 (false positive null pointer dereference, assignment in conditional)
2012-07-23 10:05:55 +02:00
Daniel Marjamäki
edea4ef131
Refactoring: Renamed CheckNullPointer::isPointer to Token::isUpperCaseName
2012-06-21 19:00:53 +02:00
PKEuS
c463d97386
Refactorization:
...
- Implemented consistent behaviour of Variable::typeStartToken/typeEndToken: Skip const and static on all variables.
- Simplified patterns containing "static|" or "const|" when matching typeStartToken.
2012-06-08 09:05:02 -07:00
Daniel Marjamäki
d1b4bea304
Fixed #3807 (False positive: possible null pointer dereference)
2012-05-31 18:41:00 +02:00
PKEuS
9dc8123151
Refactorizations:
...
- Use const string references instead of const strings copies when possible
- Fixed cppcheck warning about postfix increment in CheckIO
- Use symbolDatabase to detect pointers in CheckOther::checkAssignBoolToPointer
2012-05-25 03:09:41 -07:00
PKEuS
e8cd119ebd
Improved parsing of functions that accept nullpointers but no uninitialized data ( Fixed #3811 )
2012-05-16 00:56:39 -07:00
PKEuS
06a77679d4
Refactorizations:
...
- Added support for pointers in self assignement check
- Removed redundant for loop in checknullpointer.cpp
- Fixed warning about signed/unsigned mismatch in cppcheck.cpp by making Settings::_maxConfig unsigned
2012-05-11 10:38:19 -07:00
PKEuS
ec00824fd3
Fixed #3357 :
...
- Print "inconclusive" tag in cli
- Fixed inconclusive handling in checkbufferoverrun.cpp
- Merged reportInconclusiveError into reportError by adding an additional parameter "bool inconclusive" which is false per default
2012-05-06 10:37:41 -07:00
Daniel Marjamäki
d5442280b1
Fixed #3597 (Errors in evaluation of chained assignment operators)
2012-05-01 07:06:14 +02:00
PKEuS
8e362ad5f7
Fixed #3771
...
Stronger testing for false positives in inconclusive checking in checknullpointer.cpp
2012-04-30 12:36:41 +02:00
PKEuS
f1511dd795
Fixed #3766
2012-04-27 10:17:07 +02:00
PKEuS
c3578e88b6
Reverted erroneously committed lines at the end of nullpointer. Sorry for that
2012-04-26 17:55:31 +02:00
PKEuS
ddca2e2f85
Added a lot of functions of the C standard library to nullpointer/uninitialized buffer checking.
2012-04-26 17:53:21 +02:00
PKEuS
dd5e9aa454
Make use of recently implemented Token::type() functionality
2012-04-25 09:56:07 +02:00
PKEuS
fc8749e952
Improved nullpointer check:
...
- Fixed #3673
- Fixed potential issue with constructor calls (like #3697 )
- Added support for operator+ on std::string
2012-04-02 12:12:02 +02:00
PKEuS
0340764726
Improved nullpointer check: Detect dereferences by streams ( #410 )
...
Refactorizations:
- Replaced || by %oror% in Token::Match patterns
- Replaced some simple patterns by direct comparisions, replaced Match call with simpleMatch
- Increased data encapsulation by making more members private in CheckNullpointer
2012-03-16 17:24:03 +01:00
August Sodora
e0bee0e037
Fixed #3567 (False positives in boolean expressions)
2012-03-07 20:31:23 +01:00
PKEuS
2e13a51d08
Fixed #3591
2012-02-13 19:46:45 +01:00
Erik Lax
f1dbd1a89a
Fixed #3518 (False negative: Possible null pointer dereference (in the same condition))
2012-02-11 16:15:38 +01:00
PKEuS
42f418db54
- Improved nullpointer check: Fixed #1171
...
- Improved accuracy of function analysis in symboldatabase
- Code cleanups
2012-02-11 12:26:48 +01:00
Daniel Marjamäki
036b2a84bf
Fixed #3570 (False Postive for 'nullPointer' check)
2012-02-01 20:38:47 +01:00
Edoardo Prezioso
bb703f4d0b
Fixed: (warning) Found simple pattern inside Token::Match() call.
2012-01-28 20:31:12 +01:00
Daniel Marjamäki
01f6bbda62
Null pointers: fixed false positive when '?' is used in return statement. Ticket: #3560
2012-01-28 08:06:03 +01:00
PKEuS
5c2af0b2e3
- initialising std::string with 0 in initialisation list is partially detected in nullpointer check ( #3520 )
...
- executionpath checking makes use of symboldatabase
- CheckExceptionSafety::checkRethrowCopy makes use of symboldatabase
2012-01-26 16:50:59 +01:00
Edoardo Prezioso
20372eecfa
Fixed gcc warning: variable which shadows a member of 'this'.
2012-01-26 15:20:20 +01:00
PKEuS
42a75692d4
Improved nullpointer check:
...
- More accurate checking for dereferences and non-dereferences
- improved checking for nullpointer dereferences after return statement
- Supports pointer dereferences by std::string
- Code optimization/refactorization
2012-01-25 15:16:22 +01:00
PKEuS
36479499e7
- Solved FIXME: Made detection of code that is no pointer-dereference more robust, uncommented code (checknullpointer.cpp)
...
- Removed more indendation level counters
- Make use of symbol database more often
- Other refactorizations
2012-01-21 19:55:32 +01:00
PKEuS
c294b15360
Removed more indendation counters.
2012-01-15 12:31:49 +01:00
Reijo Tomperi
8cae17fda8
Update year to 2012
2012-01-01 01:05:37 +02:00
Reijo Tomperi
0a588496a0
Fix astyle and test failures.
2011-12-28 22:05:10 +02:00
Daniel Marjamäki
379440e2a4
CheckNullPointer: Use Tokenizer::IsScopeNoReturn
2011-12-28 08:17:58 +01:00
Daniel Marjamäki
7f42300c18
Null pointer: Removed old code for handling exit(). No testing affected.
2011-12-28 08:07:21 +01:00
Daniel Marjamäki
91874214d8
Refactoring: Added utility function that determine if scope ends with a call to a noreturn function
2011-12-27 18:00:12 +01:00
Daniel Marjamäki
385afffb14
Null pointers: show inconclusive errors if functions are called. Assume they won't assign the pointer. Ticket: #3443
2011-12-26 07:13:10 +01:00
Daniel Marjamäki
b742c03b65
Fixed #3443 (false positives: possible null pointer dereference (calling unknown function))
2011-12-25 17:01:45 +01:00
Daniel Marjamäki
2bb5de4c89
Fixed #3425 (False positive: Null pointer dereference (pointer is checked in macro))
2011-12-18 13:33:23 +01:00
PKEuS
f306246c7f
Improved support for references and pointers in SymbolDatabase
...
Replaced several isPointer functions by Variable::isPointer function
Refactorizations & Make use of symbolDatabase more often
2011-12-17 19:04:03 +01:00