Daniel Marjamäki
1d7bb05faf
Remove ExecutionPath from CheckNullPointer
2014-01-22 20:24:51 +01:00
Daniel Marjamäki
f3f7e6d302
value flow: replacing executionpath checking of null pointers
2014-01-22 20:16:31 +01:00
Daniel Marjamäki
43db1ee797
value flow: use more specific bailouts when analysing value flow after assignment
2014-01-22 06:38:25 +01:00
Daniel Marjamäki
a84fdf98cc
Null pointer: remove old checking that is replaced by value flow checking
2014-01-21 19:50:52 +01:00
Daniel Marjamäki
69109784e8
value flow: cleanup usage of valueflow. utility function Token::getValue was added.
2014-01-20 06:49:45 +01:00
Daniel Marjamäki
30cae358d8
Removed the --value-flow flag. ValueFlow analysis will always be enabled from now on.
2014-01-17 18:07:05 +01:00
Daniel Marjamäki
5721e1d745
CheckNullPointer: Removed some of the old checking that doesn't use ValueFlow
2014-01-17 17:47:59 +01:00
Daniel Marjamäki
bfc67a536a
value flow: fixed fp when self-checking checkbool.cpp. added some comments.
2014-01-13 06:15:21 +01:00
Daniel Marjamäki
f6c7be91a9
Fixed cppcheck warning
2014-01-12 21:19:20 +01:00
Daniel Marjamäki
8b6f001f94
value flow: inconclusive handling of unknown functions
2014-01-12 19:48:20 +01:00
Daniel Marjamäki
5d2a39b580
CheckNullPointer: improved function call checking when new value flow analysis is used
2014-01-12 19:27:26 +01:00
Daniel Marjamäki
02b92efd1a
value flow: improved analysis of expressions below ?, && and || operators
2014-01-11 12:44:55 +01:00
Daniel Marjamäki
7c4a7ac3d5
value flow: starting to refactor CheckNullPointer::nullPointerDeRefThenCheck
2014-01-08 17:37:39 +01:00
Daniel Marjamäki
7125682d1a
Fixed #5274 (TokenList: macro handling)
2014-01-03 18:53:37 +01:00
Daniel Marjamäki
abdd29fce3
fixed FP when passing uninitialized buffer as 2nd argument to itoa
2013-12-13 07:51:33 +01:00
Daniel Marjamäki
20b84fcdee
Null pointers: Don't warn when first argument to freopen() is NULL
2013-11-08 13:22:07 +01:00
Daniel Marjamäki
7996d609be
Fixed #5108 (false positive: uninitialized variable (assignment in function parameter))
2013-11-04 23:09:15 +01:00
Daniel Marjamäki
4a6274dcc0
Merge pull request #183 from felipensp/null_ptr_typeof
...
- Fixed false positive when passing pointer to typeof()
2013-10-27 02:37:31 -07:00
Daniel Marjamäki
fd0f2d7900
Fixed #4929 (False positive: possible null pointer deref (checks dont handle && and || well))
2013-10-22 10:47:48 +02:00
Daniel Marjamäki
fc26de89a9
Fixed #5082 (False positive: (error) Possible null pointer dereference: p2)
2013-10-20 13:37:36 +02:00
Felipe Pena
ecb0e70250
- Fixed false positive when passing pointer to typeof()
2013-10-12 10:19:15 -03:00
Robert Reif
1fccfd50eb
Fixed #5080 ((error) Internal error. Token::Match called with varid 0. Please report this to Cppcheck developers)
2013-10-12 10:50:59 +02:00
Lucas Manuel Rodriguez
a70b0cd0f3
Fixed FP: Null pointer dereference
2013-08-24 16:50:19 -03:00
Daniel Marjamäki
9c67af058a
SymbolDatabase: Renamed Variable::varId() to Variable::declarationId() to make it more clear how it works.
2013-07-20 12:31:04 +02:00
Daniel Marjamäki
a01e54fdd9
astyle formatting
2013-07-15 21:57:10 +02:00
Daniel Marjamäki
7443883b9c
Library: Improved handling in CheckNullPointer::parseFunctionCall for Library data
2013-07-15 18:55:40 +02:00
Daniel Marjamäki
10849e220b
Fixed #4809 (Review CheckNullPointer::parseFunctionCall)
2013-06-07 06:37:53 +02:00
Daniel Marjamäki
079d22fbee
Fixed #4734 (False 'Possible null pointer dereference')
2013-05-03 16:18:44 +02:00
Zachary Blair
1f97e0e5df
Ticket #4510 - Reduced the scope of the safeFunctions variable to avoid a cppcheck style issue
2013-04-26 20:06:17 -07:00
Zachary Blair
2bc67d72c2
Ticket #4510 - Fixed a Travis build error resulting from reporting a warning when warnings are not enabled
2013-04-26 00:19:39 -07:00
Zachary Blair
35668380cf
Fixed #4510 (False positive: "Possible null pointer dereference if the default parameter value is used" after init)
2013-04-25 00:25:56 -07:00
Frank Zingsheim
54e7c8f6a2
Implemented support for move constructors:
...
Adapt code to Function::eMoveConstructor
introduced in commit eb2962792f
2013-04-10 21:57:22 +02:00
Daniel Marjamäki
38680e3440
Fixed #4677 (Message for 'possible null pointer dereference, otherwise it is redundant to check..' is warning but says error)
2013-04-07 03:41:02 +02:00
PKEuS
51685f24c5
Improved expression parsing in CheckNullPointer::isPointerDeRef() - fixed #4692
2013-04-03 01:27:08 -07:00
Daniel Marjamäki
2b51993b9f
Fixed Cppcheck warning. Function can be const
2013-03-29 17:55:29 +01:00
PKEuS
0105f8223c
Simplified several Token::Match/simpleMatch calls when match string consists of a single pattern
...
Fixed two CheckInternal error messages
2013-03-01 03:42:04 -08:00
PKEuS
670c4de8a9
Changed behaviour of Token::is*Op() functions:
...
- Rename Token::isOp() to Token::isConstOp() (indicating that the operator does _not_ modify the input variables)
- Create new Token::isOp(), returning true also for ++, -- and assignment operators
- Make Token::isExtendedOp() returning also true for all assignment and ++/-- operators
2013-02-28 12:50:29 -08:00
zblair
ed03e2c845
Fixed #4539 (False positive: Possible null pointer dereference)
2013-02-27 23:45:21 -08:00
Daniel Marjamäki
1e550f9fdf
Reverted fix for #4547 : It causes fp. See #4573
2013-02-12 16:13:08 +01:00
Robert Reif
42588e9729
Fixed #4535 (Simplify checks by caching symbol database Variable pointer in Token)
2013-02-06 06:39:58 +01:00
Frank Zingsheim
d9de7f7052
Travis: Fixed Cppcheck warnings (related to #4547 )
2013-02-05 23:31:53 +01:00
Daniel Marjamki
abd536b84c
Null pointer: Changed 'possible null pointer dereference - otherwise condition is redundant' to warning
2013-02-02 15:46:29 +01:00
Daniel Marjamäki
a04f7b1a94
CheckNullPointer::isPointerDeRef: Refactoring - use tok->variable(). Ticket: #4535
2013-02-01 19:10:14 +01:00
Robert Reif
ec1c86c152
Symbol database: more function/variable cleanup. Ticket: #4494
2013-01-31 06:41:18 +01:00
Daniel Marjamäki
fc42aa3a30
Fixed #4523 (false positive: (error) Possible null pointer dereference)
2013-01-30 16:52:12 +01:00
Daniel Marjamäki
509dd9a989
Fixed #4523 (false positive: (error) Possible null pointer dereference)
2013-01-29 17:12:14 +01:00
Robert Reif
859793731d
SymbolDatabase: Refactor findFunction handling. Ticket: #4494
2013-01-28 06:47:48 +01:00
Thomas Jarosch
f97015e244
Don't use Token::Match() for simple string comparison
2013-01-22 13:16:23 +01:00
Frank Zingsheim
096cb1bd88
Fixed #3686 : false positive: Possible null pointer dereference (inconclusive)
2013-01-21 19:38:59 +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