Daniel Marjamäki
e32ab4bf65
uninitialized struct members: improved fix
2013-01-17 17:21:21 +01:00
Daniel Marjamäki
93fb6b0c6a
Fixed #4493 (FP: uninit struct member (struct is assigned))
2013-01-17 17:01:04 +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
de2c133f6a
Fixed #4426 (False positive: Unitialized variable warning when comparing addresses)
2012-12-28 12:32:15 +01:00
Daniel Marjamäki
6770cc80be
Uninitialized variables: Added debug warning for bailout
2012-12-28 11:42:50 +01:00
Daniel Marjamäki
b914466285
Uninitialized variables: fixed false positives by bailing out when variable is conditionally initialized and then there is a conditional return.
2012-12-27 18:45:00 +01:00
acm4me
7da155c8ba
Support for Sun Studio C++ compiler
2012-12-27 11:51:12 +01:00
Daniel Marjamäki
f16c30248a
Uninitialized variables: fixed FP when there are function calls where type* is converted to unknown_type
2012-12-25 14:05:29 +01:00
Daniel Marjamäki
f381058293
Uninitialized variables: fixed FP when there are suspicious function calls where type** is converted to type*
2012-12-25 13:58:15 +01:00
Daniel Marjamäki
bcc5a82b1d
Uninitialized variables: Fixed FP when using typeof on uninitialized data in return statement
2012-12-25 13:31:54 +01:00
Daniel Marjamäki
299c1bb208
Uninitialized variables: handle unsimplified labels better
2012-12-25 10:37:21 +01:00
Daniel Marjamäki
83da4125e3
Uninitialized variables: Better value flow analysis. Fixed false positives.
2012-12-24 19:11:13 +01:00
Daniel Marjamäki
0b4da3d5cd
Uninitialized variables: Fixed false positives when variable x is given a nonzero value when variable y is uninitialized.
2012-12-23 16:27:04 +01:00
Daniel Marjamäki
2050cd71db
Uninitialized variables: Better testing of function handling
2012-12-21 19:32:56 +01:00
Daniel Marjamäki
dc6aa92f3b
Uninitialized variables: warn about structs in C code
2012-12-21 18:50:38 +01:00
Daniel Marjamäki
cf84c211ed
Uninitialized variables: Improved handling of function calls
2012-12-21 17:04:15 +01:00
Daniel Marjamäki
415ee977d8
Uninitialized variables : fixed false positives when passing address of pointer to function.
2012-12-21 16:57:49 +01:00
Daniel Marjamäki
ccdea4dc2b
Uninitialized variables: Improved checking of functions
2012-12-20 19:45:30 +01:00
Daniel Marjamäki
3913fd8398
Fixed #4320 (False positives 'unassignedVariable' and 'uninitvar')
2012-12-18 19:02:30 +01:00
Daniel Marjamäki
82223227bd
Uninitialized variables: Fixed false negative in new checking when using while loops
2012-11-30 06:30:04 +01:00
Daniel Marjamäki
68327b3c64
Uninitialized variables: Fixed TODO testcase
2012-11-29 18:41:48 +01:00
PKEuS
6122819832
Message refactorization: Changed expression "0-terminate" to "null-terminate" as discussed on 24b98feadb
2012-11-03 21:21:19 +01:00
PKEuS
24b98feadb
Message refactorization: checkuninitvar.cpp, checkunusedfunctions.cpp, checkunusedvar.cpp
2012-11-01 18:40:20 +01:00
Edoardo Prezioso
8324de1dc0
Fixed 'tokAt(-2)->link() -> linkAt(-2)' thanks to cppcheck internal check.
2012-10-13 14:59:34 +02:00
Daniel Marjamäki
753942df0c
Revert "Fixed #4165 (False positive:(error) Uninitialized variable: here)"
...
This reverts commit 96b1890797
.
2012-09-26 16:15:35 +02:00
Daniel Marjamäki
96b1890797
Fixed #4165 (False positive:(error) Uninitialized variable: here)
2012-09-25 20:45:42 +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
Daniel Marjamäki
84c0368bfd
Fixed #3586 (false positive: uninitvar in argument in namespaced function)
2012-09-15 10:48:17 +02:00
Daniel Marjamäki
d3bdd84d8b
Fixed #4175 (segmentation fault of cppcheck)
2012-09-09 18:56:26 +02:00
Daniel Marjamäki
d34924ba6d
Uninitialized variables: Fixed false positive when there is assignment in condition
2012-07-17 07:03:40 +02:00
Daniel Marjamäki
f9da83f4b5
Fixed #3926 (false postive: (error) Uninitialized variable: exitpattern)
2012-07-03 18:52:23 +02:00
Daniel Marjamäki
2e3a08a8c1
Fixed #3916 (false positive: uninitialized variable when using assignment and , in rhs)
2012-06-27 20:44:19 +02:00
Daniel Marjamäki
9da3373876
Fixed #3919 (False positive: uninitialized variable (extern))
2012-06-26 18:28:41 +02:00
Daniel Marjamäki
b6f4dbd067
Uninitialized variables: Fixed TODO assertion (related with ticket #3106 )
2012-06-23 16:06:20 +02:00
Daniel Marjamäki
7f5950967e
Reviewed handling of >> in return statements in C files in UninitVar checking
2012-06-23 15:47:48 +02:00
Daniel Marjamäki
f0f69ed818
Reviewed handling of << and >> in C files in CheckUninitVar
2012-06-23 12:41:00 +02:00
Daniel Marjamäki
e2964c0c9e
Uninitialized variables: Fixed false negative when ? operator is used in rhs
2012-06-23 12:19:03 +02:00
Daniel Marjamäki
d2dbaca24b
Reviewed handling of unknown types in C files in UninitVar
2012-06-22 19:57:07 +02:00
Daniel Marjamäki
abaa044e03
Reviewed handling of unknown types in CheckUninitVar
2012-06-22 16:39:39 +02:00
Daniel Marjamäki
354406441a
Fixed #3906 (false positive uninitvar for vector pointer)
2012-06-22 16:26:43 +02:00
Daniel Marjamäki
edea4ef131
Refactoring: Renamed CheckNullPointer::isPointer to Token::isUpperCaseName
2012-06-21 19:00:53 +02:00
Daniel Marjamäki
ce5c38f52c
Fixed #3890 (False positive Uninitialized variable on returning default value on a class member)
2012-06-19 20:04:10 +02:00
Daniel Marjamäki
cc5e06b5d2
Fixed #3861 (uninitialized variables)
2012-06-13 19:09:51 +02:00
Daniel Marjamäki
c5da030674
Fixed #3869 (References to items in array result it 'Uninitialized variable' errors)
2012-06-08 16:17:55 +02:00
Simon Martin
cede3fc805
Get rid of a warning
2012-05-26 15:49:40 +02:00
PKEuS
f4bf94ca4f
Fixed #3845
2012-05-25 07:28:32 -07:00
PKEuS
79445e52ad
Refactorized CheckUninitVar to use SymbolDatabase
2012-05-25 04:40:18 -07:00
Daniel Marjamäki
fc7f78244e
Fixed #3708 (False positive: uninitialized variable (allocation, unknown nonpointer type))
2012-05-14 18:34:39 +02:00