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
PKEuS
4f0121ee2f
Splitted simplification out of tokenize()
2013-12-30 17:45:28 +01:00
Daniel Marjamäki
872b6e8fcc
Fixed VS compiler warning. Using 'struct' for class. Thanks XhmikosR for reporting.
2013-12-26 17:48:25 +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
5f0cfa0ee4
Fixed #4983 (False positive warning 'Possible null pointer dereference: lblList - otherwise it is redundant to check it against null.' with sizeof lblList[0])
2013-11-02 23:56:10 +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
PKEuS
a9a5dc0354
Updated to AStyle 2.03, require this version
2013-08-07 16:27:37 +02:00
Daniel Marjamäki
a1fafa7f06
Library: added <formatstr> and <strz> to argument checks
2013-07-22 20:21:45 +02:00
Daniel Marjamäki
fa7f8ddc78
Library: Renamed Argument to ArgumentChecks to make it a bit more clear
2013-07-16 09:40:31 +02:00
Daniel Marjamäki
d25e7d4a21
Library: fixed problems
2013-07-16 08:21:38 +02:00
Daniel Marjamäki
24dfc052e2
astyle formatting
2013-07-15 21:57:58 +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
c389e08353
Fixed #4728 (simplify known variables better (%var% & %num%, bitwise and))
2013-06-26 18:13:28 +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
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
Daniel Marjamäki
4e65800adf
TestRunner: Updated warning message when there is unsimplified code
2013-04-16 16:54:19 +02:00
Daniel Marjamäki
fdac502c39
Simplified TestNullPointer test cases
2013-04-15 19:00:15 +02:00
PKEuS
693c6e84cb
Removed more duplicate unit tests
2013-04-13 01:49:17 -07: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
Ettl Martin
1b9c1c03fa
unittests: removed not needed '\n' at the end of testcases.
2013-03-20 15:36:16 +01:00
Ettl Martin
7c0905cd4e
#4665 added todo unittest
2013-03-19 08:47:05 +01:00
zblair
ed03e2c845
Fixed #4539 (False positive: Possible null pointer dereference)
2013-02-27 23:45:21 -08: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
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
Frank Zingsheim
096cb1bd88
Fixed #3686 : false positive: Possible null pointer dereference (inconclusive)
2013-01-21 19:38:59 +01:00
Zachary Blair
309edbbdc5
Fixed #4389 (False positive: Possible null pointer dereference if the default parameter value is used)
2013-01-09 23:22:54 -08: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
f127d56719
Null pointer: Fixed FP when there are 'return p?p->x:0;'
2012-12-25 14:23:50 +01:00
PKEuS
4737966caf
Unit test cleanup: Removed some empty lines and whitespaces before \n.
2012-12-06 10:19:22 -08:00
Zachary Blair
095824373a
Fixed #3302 (new check: nullpointer dereference)
2012-11-20 23:56:17 -08:00
PKEuS
4ee955fc8c
Improved CheckNullPointer::isPointerDeRef():
...
- Fixed #4240
- Added support for wstring/wchar_t
2012-11-10 19:53:20 +01:00
Robert Reif
8e14d7682c
Symbol database: fix some function prototype bugs that were found during check conversions. Ticket: #4266
2012-10-30 15:48:06 +01:00
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
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
Daniel Marjamäki
985ac662ee
Fixed #4035 (False positive: Memory leak: pTempFile)
2012-08-25 12:00:25 +02:00
PKEuS
35d94c26d5
Changed creation of SymbolDatabase. Database always created after Tokenizer::tokenize() and Tokenizer::simplifyTokenList() instead of on-demand creation by Tokenizer::getSymbolDatabase.
...
-> With Token::scope() it is possible to access the symboldatabase without having to call getSymbolDatabase(). The change increases safety because it is guaranteed that the database is available in all checks, even if the specific check doesn't call getSymbolDatabase
- Tokenizer::_symbolDatabase does no longer have to be mutable -> Increased const correctness
The change above required two additional changes:
- A bug causing a debug message was fixed in the symboldatabase that became visible in the test suite by the change above.
- Simplify expressions like "struct struct Foo" which might be result of typedef instanciation.
2012-08-12 03:01:24 -07:00
PKEuS
25ecd3ed71
Message refactorization: checknullpointer.cpp
...
Removed a duplicate test in checknullpointer.cpp
2012-08-05 01:38:48 -07:00
Daniel Marjamäki
a733c9b603
Fixed #3914 (false positive null pointer dereference, assignment in conditional)
2012-07-23 10:05:55 +02:00