Kimmo Varis
5766e83309
Improve ifdeffing.
2010-04-05 09:48:19 +03:00
Daniel Marjamäki
d26a2cfc16
Uninitialized variables: Detect reading uninitialized data through array/pointer variable
2010-04-05 08:38:26 +02:00
Reijo Tomperi
6db663f6de
Fix #1322 (Add cppcheckError and unusedFunction to --errorlist, give out internal errors in xml)
...
http://sourceforge.net/apps/trac/cppcheck/ticket/1322
2010-04-04 23:55:28 +03:00
Daniel Marjamäki
abceff497b
Refactoring: some refactoring of ExecutionPath. The foundError was removed. No automatic bailout of all checks are made when errors are found.
2010-04-04 11:24:52 +02:00
Daniel Marjamäki
78852b08ab
Fixed #1566 (false negative: uninitialized variable)
2010-04-04 09:17:53 +02:00
Daniel Marjamäki
849be383e6
Tokenizer: tokenize 1E-2 into a single token
2010-04-04 08:01:05 +02:00
Reijo Tomperi
be598757a1
Fix segmentation fault when calling with --errorlist and add a testcase for it.
2010-04-03 22:53:06 +03:00
Daniel Marjamäki
a8f566bfcd
Cleanup: Removed redundant simplification in checkmemoryleak.cpp
2010-04-03 20:47:38 +02:00
Daniel Marjamäki
6acb304ef2
Cleanup: Removed unfinnished checking of std::find
2010-04-03 15:33:13 +02:00
Daniel Marjamäki
8a8547e6b7
astyle formatting
2010-04-03 14:28:32 +02:00
Daniel Marjamäki
a4144b9d18
Refactoring: Moved copy/paste code in Tokenizer
2010-04-03 09:54:10 +02:00
Daniel Marjamäki
f8367da1fd
Refactoring: broke out copy/pasted code
2010-04-03 09:17:16 +02:00
Daniel Marjamäki
5f9e14e242
Borland C++: Fixed compiler error
2010-04-03 07:51:40 +02:00
Reijo Tomperi
38d64d0520
astyle fix
2010-04-02 23:44:24 +03:00
Martin Ettl
622663b8db
added a helper function to mathlib::isNullValue(), it checks wheter a string has a null representation or not and returns a boolian result; extended nullchecks in testmathlib.cpp
2010-04-02 22:41:54 +02:00
Daniel Marjamäki
427d155644
Fixed #1527 (Function can't be const if it has non-const operator overload call)
2010-04-02 22:03:07 +02:00
Reijo Tomperi
93d4851040
astyle fix
2010-04-02 22:17:09 +03:00
Martin Ettl
f36af278d0
#ticket #1513 added asin() support
2010-04-02 21:02:39 +02:00
Martin Ettl
0c2f4831d8
#ticket #1513 added asin() support
2010-04-02 20:59:39 +02:00
Daniel Marjamäki
ff38bbf468
Cleanup: The Tokenizer doesn't need to handle UTF in code nor multiline string. That is handled in the Preprocessor.
2010-04-02 20:48:32 +02:00
Reijo Tomperi
a1d0defbc0
astyle fix
2010-04-02 21:42:06 +03:00
Martin Ettl
5a21fe7ae8
Merge branch 'master' of git@github.com:danmar/cppcheck
2010-04-02 20:24:04 +02:00
Daniel Marjamäki
1d1d79a1e5
Cleanup: Removed unused %name% cmd for patterns
2010-04-02 20:25:13 +02:00
Martin Ettl
c391a03db6
added acos() check to ticket #1513 ; added testcases for MathLib::toDoubleNumber(), now double conversion of zeros is handled correctly; changed assertEquals() function of testsuite parameters from unsigned int to double. This is needed to avoid overflow of unsigned int by comparing negative floating point values.
2010-04-02 20:23:37 +02:00
Daniel Marjamäki
c6bbc9d739
Fixed #1565 (False positive: Uninitialized variable 'B::j'. There are 2 classes with the name 'B')
2010-04-02 19:29:54 +02:00
Martin Ettl
9788333ee9
added log10() check, for checking about parameters passed to mathfunctions that do not make sense
2010-04-02 19:17:41 +02:00
Robert Reif
805c683c1a
Cleanup: Removed unneeded code
2010-04-02 18:55:27 +02:00
Daniel Marjamäki
734b10e650
Fixed #1479 (false positive: unintialized variable when using goto)
2010-04-02 08:35:05 +02:00
Robert Reif
3507b06e0b
Fixed #1563 (false positive: function can be const (assignment to static))
2010-04-02 08:02:47 +02:00
Robert Reif
1dcbf02bd8
Fixed #1553 (false positive : uninitialized variable for struct timeval from <sys/time>)
2010-04-02 07:36:18 +02:00
Daniel Marjamäki
8b5aae9adb
astyle formatting
2010-04-02 07:32:03 +02:00
Daniel Marjamäki
0cad22314e
Reverted 'astyle fix'. Those changes are not in sync with my astyle configuration/setup.
2010-04-02 07:30:58 +02:00
Martin Ettl
193aa7d1d3
astyle fix
2010-04-02 02:21:53 +02:00
Martin Ettl
b5fb01c202
ticket #1513 new check: Detecting obviously wrong math call arguments passed to math functions)
2010-04-02 02:19:38 +02:00
Reijo Tomperi
c7d36b73ed
Fix #1548 (False positive: array index out of bounds in for-loop)
...
http://sourceforge.net/apps/trac/cppcheck/ticket/1548
2010-04-01 22:35:36 +03:00
Robert Reif
2825773918
Fixed #1552 (false positive: function can be const (array of struct))
2010-04-01 17:01:52 +02:00
Robert Reif
2c5fb55c3b
Fixed #1551 (false positive: The function 'A::vSet' can be const)
2010-04-01 16:59:35 +02:00
Robert Reif
a8c9aa1f8d
Fixed #1550 (Improve check: Assignment to self)
2010-04-01 16:40:12 +02:00
Reijo Tomperi
c460c16cee
Fix cross compiling in Linux
...
Change: #include "fileLister_win32.h" -> #include "filelister_win32.h"
2010-03-31 22:54:35 +03:00
Daniel Marjamäki
a68d8dbc77
Fixed #1549 (false positive: uninitialized variable)
2010-03-31 20:20:51 +02:00
Robert Reif
78e54e17f2
Unit testing: Added test case for memset. Ticket: #1538
2010-03-31 19:53:53 +02:00
Robert Reif
ef57d01f7a
Fixed #1492 (false negatives: array index out of bounds)
2010-03-31 17:14:49 +02:00
Robert Reif
7fb5b9b67b
Better checking for assignment to self. Ticket: #1550
2010-03-31 17:09:59 +02:00
Robert Reif
32e597e343
Fixed #1539 (False positive: possible error Array index out of bounds)
2010-03-30 17:33:17 +02:00
Daniel Marjamäki
c213227133
Fixed #1535 (False positive: member variable not initialized, struct with constructor)
2010-03-29 20:34:47 +02:00
Robert Reif
0bddd1977f
Fixed #1536 (###### If you see this, there is a bug ###### Token::Match() - varid was 0)
2010-03-29 17:25:38 +02:00
Daniel Marjamäki
c3edc5fd89
Fixed #1148 (improve check: usage of uninitialized variables)
2010-03-28 21:27:06 +02:00
Daniel Marjamäki
9656379ffb
Merge branch 'master' of git@github.com:danmar/cppcheck
2010-03-28 15:56:38 +02:00
Robert Reif
62d2845014
Fixed #1492 (false negatives: array index out of bounds)
2010-03-28 15:56:13 +02:00
Reijo Tomperi
417f14fccf
Fix #1534 (False positive with #elif (defined NAME))
...
http://sourceforge.net/apps/trac/cppcheck/ticket/1534
2010-03-28 15:15:25 +03:00
Robert Reif
2dc4222c9a
Refactoring: Added CheckClass::isMemberFunc
2010-03-28 11:46:42 +02:00
Daniel Marjamäki
16124ce646
Fixed #1516 (C++Builder properties mistaken for uninitialized variables)
2010-03-28 10:58:03 +02:00
Daniel Marjamäki
c7867af3c5
Fixed #1533 (False positive: Uninitialized variable)
2010-03-28 10:42:37 +02:00
Reijo Tomperi
86fabd03b3
Fix #1532 (hang due to commit 772aa95c8a
)
...
http://sourceforge.net/apps/trac/cppcheck/ticket/1532
2010-03-27 21:52:31 +02:00
Martin Ettl
e4bda66b28
extended The function can be const test
2010-03-27 14:11:46 +01:00
Robert Reif
c50469dba6
Fixed #1523 (false negative:: buffer access out of bounds when using shift operator)
2010-03-27 07:21:08 +01:00
Reijo Tomperi
0cc84bd2be
Partial fix for #1475 (False positive: Not enough parameters for macro: #define A(a, b...))
...
http://sourceforge.net/apps/trac/cppcheck/ticket/1475
2010-03-26 22:11:49 +02:00
Robert Reif
2eceaaefc0
Fixed #1519 (false negative: the function can be declared as const)
2010-03-26 20:14:31 +01:00
Robert Reif
45865f54a8
Fixed #1525 (false negative: the function can be declared as const (member declared as mutable))
2010-03-26 19:06:00 +01:00
Robert Reif
307000b448
Fixed #1529 (false positive: function can be const (struct member variable))
2010-03-26 18:16:33 +01:00
Daniel Marjamäki
258e7e292e
Fixed #1496 (false positive: Member variable not initialized in the constructor 'X::m_d')
2010-03-26 17:19:33 +01:00
Raphael Geissert
c0e09c4cb3
Fixed #1511 (false negative null pointer deref when dereferencing pointers to constants)
2010-03-26 16:44:46 +01:00
Robert Reif
a1528d3154
Fixed #1522 (false positive: function can be const (assignment in return))
2010-03-26 16:30:30 +01:00
Daniel Marjamäki
80edb4d8f4
Tokenizer: Simplify 'false ==' to '!'
2010-03-24 19:55:02 +01:00
Robert Reif
e95bc41e59
Fixed #1522 (false positive: function can be const (assignment in return))
2010-03-24 19:31:30 +01:00
Robert Reif
9808a59cc1
Fixed #1515 (false positive: The function 'wxThreadInternal::SetExitCode' can be const)
2010-03-23 07:37:20 +01:00
Robert Reif
637a34bfd2
Fixed #1517 (false negative: the function can be declared as const)
2010-03-23 07:34:34 +01:00
Daniel Marjamäki
5b1b845750
Fixed #1504 (False positive: Cppcheck incorrectly reports that extern variable is not initialized)
2010-03-20 08:03:18 +01:00
Daniel Marjamäki
3d90559035
Fixed #1386 and #1387 (False positives given by CheckMemoryLeakInFunction when temporary and member variable don't have the same allocation and deallocation)
2010-03-20 07:50:52 +01:00
Daniel Marjamäki
f687e85be5
Fixed #1498 (false positive: The function 'V<unsigned>::vSet' can be const)
2010-03-19 19:34:26 +01:00
Robert Reif
0fb680d887
Tokenizer: remove unnamed anonymous structures and unions ( #1493 )
2010-03-19 19:04:56 +01:00
Robert Reif
92fe14e7f0
Fixed #1491 (False positive when putting an access specifier at the end of a class declaration)
2010-03-19 17:40:23 +01:00
Daniel Marjamäki
54c5d53eac
Fixed #1428 (False positive: (possible error) Memory leak when memory deleted in destructor)
2010-03-19 16:57:23 +01:00
Robert Reif
9c2248254e
Here is a patch that adds support for derived structs and fixes a bug that missed some nested structs. ( #1493 )
2010-03-19 16:17:25 +01:00
Raphael Geissert
d11004fa3d
Fixed #1512 (incorrect handling of ndefs in the preprocessor)
2010-03-19 16:13:45 +01:00
Daniel Marjamäki
c7bd437d7d
astyle formatting
2010-03-19 16:12:51 +01:00
Daniel Marjamäki
95d22de690
Fixed #1508 (false positive : uninitialized variable)
2010-03-18 19:23:38 +01:00
Daniel Marjamäki
45987e5e9f
doxygen: some updates to the lib/checkother
2010-03-18 18:59:55 +01:00
Robert Reif
5ea7e32bf9
Partial fix for #1493 (false positives: function can be const and struct or union member is never used)
2010-03-18 18:14:52 +01:00
Daniel Marjamäki
e911d1f1df
doxygen updates
2010-03-17 22:16:18 +01:00
Daniel Marjamäki
89719b023e
unit testing: made Tokenizer functions public so they can be unit tested
2010-03-17 22:08:02 +01:00
Daniel Marjamäki
1d0cd9c267
refactoring: no need to hide functions because the definition isn't seen by the core program anyway.
2010-03-17 21:26:56 +01:00
Robert Reif
b3856cbc5e
Fixed #1506 (typedef name hiding check combined with forward declaration leeds to false positive)
2010-03-17 17:31:08 +01:00
Daniel Marjamäki
12c45a1aba
Fixed #1476 (false positive: Uninitialized variable)
2010-03-16 19:53:09 +01:00
Daniel Marjamäki
235404077f
Fixed #1501 (false positive: Variable 'n' is assigned a value that is never used)
2010-03-16 19:25:10 +01:00
Daniel Marjamäki
15d67a2369
Fixed #1503 (False positive for uninitialized variable)
2010-03-16 19:09:37 +01:00
Robert Reif
89c57c72c5
small const fix
2010-03-16 07:31:40 +01:00
Daniel Marjamäki
9d822c77aa
doxygen: Some comments for CheckOther, added @todo to Token::Match
2010-03-14 19:11:03 +01:00
Daniel Marjamäki
933289a6d7
doxygen: updated comments for Cppcheck and FileLister
2010-03-14 18:55:33 +01:00
Daniel Marjamäki
382e41d92a
Fixed #1494 (Improve Tokenizer::simplifyKnownVariables to handle for loops better)
2010-03-14 09:57:34 +01:00
Daniel Marjamäki
7bcb7897e4
doxygen: fixed error messages
2010-03-14 07:48:44 +01:00
Daniel Marjamäki
e4a45aefe2
doxygen: fixed warning messages
2010-03-13 22:16:06 +01:00
Daniel Marjamäki
c5e0104ab8
doxygen: updated comments for ErrorLogger and Severity
2010-03-13 21:49:09 +01:00
Daniel Marjamäki
30d3418b11
doxygen: added more comments for CheckNullPointer and CheckUninitVar
2010-03-13 21:42:59 +01:00
Daniel Marjamäki
9b550a3f87
doxygen: added comments
2010-03-13 21:12:18 +01:00
Daniel Marjamäki
9fe9be1ea9
Fixed #1465 (false positive: unintialized class member)
2010-03-13 20:24:39 +01:00
Daniel Marjamäki
65ae37de2f
Fixed #1460 (false positive: memory leak when using throw no_memory)
2010-03-13 17:11:48 +01:00
Daniel Marjamäki
772aa95c8a
Fixed #1477 (false positive: Uninitialized variable when pointer given to struct)
2010-03-13 11:52:48 +01:00
Robert Reif
846a3a0186
Fixed #1491 (False positive when putting an access specifier at the end of a class declaration)
2010-03-13 08:06:20 +01:00
Robert Reif
f552ca5462
Fixed #1482 (Improve check const-function: function can be made const when assignment not to member variable (false negative))
2010-03-12 18:30:20 +01:00
Kimmo Varis
4cad4410ba
Fix ignoring filelister_unix.cpp code in Windows.
2010-03-12 17:28:55 +02:00
Daniel Marjamäki
7ea37de329
astyle formatting
2010-03-12 07:23:53 +01:00
Kimmo Varis
a7996ab252
Fix compiling in Linux. Fix compiling dmake.
2010-03-11 22:15:15 +02:00
Kimmo Varis
9b16fd7be4
Add Unix/Linux version of FileLister and do some cleanups.
2010-03-11 22:12:27 +02:00
Kimmo Varis
27d06855b4
Remove Win32 implementation from common file.
2010-03-11 21:58:59 +02:00
Kimmo Varis
d1bbcf1734
Implement Win32 FileLister as separate class.
...
Improve the system used to have separate versions of code of FileLister for
Win32 and Linux. New idea is to have Base FileLister class implementing
common code and then derived classes for Win32 and Linux specific code.
FileLister is not anymore a static class. Instead we use singleton of
derived class.
2010-03-11 21:58:59 +02:00
Daniel Marjamäki
587081cab5
Fixed #1488 (Invalid warning about shadowed variable)
2010-03-10 16:47:39 +01:00
Robert Reif
09ab841789
Fixed #1486 (--errorlist shows two identical id values)
2010-03-10 07:47:01 +01:00
Daniel Marjamäki
0f43ce4743
updated version to 1.42
2010-03-09 19:05:28 +01:00
Daniel Marjamäki
04ff061bbb
astyle formatting
2010-03-09 12:41:40 +01:00
Daniel Marjamäki
5d68952bd2
checkbufferoverrun: Refactorings
2010-03-09 12:04:22 +01:00
Daniel Marjamäki
0597026f13
Revert "checkbufferoverrun: Fixed signedness compiler warnings"
...
This reverts commit 3123de346c
.
This commit caused failed tests
2010-03-09 11:03:45 +01:00
Daniel Marjamäki
3123de346c
checkbufferoverrun: Fixed signedness compiler warnings
2010-03-09 10:56:31 +01:00
Daniel Marjamäki
dbc235bd39
Function constness: I don't think it's necessary to show both definition and implementation location. I changed so only the location of the definition is shown. This fixes #1486 .
2010-03-09 07:29:03 +01:00
Reijo Tomperi
a0d6da506b
Fix #1485 (cppcheck.exe 1.41 crashes when calling with option --errorlist)
...
http://sourceforge.net/apps/trac/cppcheck/ticket/1485
2010-03-08 22:40:50 +02:00
Daniel Marjamäki
071aefbb58
1.41: Set version in files
2010-03-07 16:25:37 +01:00
Daniel Marjamäki
770d2ff835
Simplify enum: Fixed segmentation fault if code ends with enum type id
2010-03-07 13:01:56 +01:00
Daniel Marjamäki
fa493b7fd1
Fixed #1474 (segmentation fault of cppcheck)
2010-03-07 12:50:45 +01:00
Daniel Marjamäki
7f42ed3ad0
Fixed #1472 (false positive: Data is allocated but not initialized: service)
2010-03-07 09:08:52 +01:00
Reijo Tomperi
b88126a669
Fix #1469 (False positive: Resource leak when fclose() is inside while)
...
http://sourceforge.net/apps/trac/cppcheck/ticket/1469
2010-03-06 16:28:52 +02:00
Daniel Marjamäki
fe30c1ca9d
Fixed #1432 (false positive: uninitialized variable)
2010-03-06 13:48:43 +01:00
Reijo Tomperi
237fdbc653
Fix #1454 (False positive: arrayindexoutofbounds, static member sharing local name)
...
http://sourceforge.net/apps/trac/cppcheck/ticket/1454
2010-03-06 14:35:04 +02:00
Robert Reif
7c283d1321
Fixed #1321 (Improve check const-function: function that is not implemented inline can be made const)
2010-03-05 17:06:25 +01:00
Daniel Marjamäki
4bb5272760
Fixed #1466 (false positive: Invalid number of character ({) when these macros are defined: '')
2010-03-04 18:51:25 +01:00
Daniel Marjamäki
d643bbe864
simplify templates: show debug message when bailout out
2010-03-04 18:20:08 +01:00
Daniel Marjamäki
b55a7f2815
SimplifyTemplates: some simple refactoring so template name is properly seen. If it's not properly handled then bailout. Related with #1464
2010-03-04 17:34:14 +01:00
Reijo Tomperi
d881fd7a31
Partial fix #1464 (takes too long (days) to process some files)
...
Fix template functions that return "&T".
http://sourceforge.net/apps/trac/cppcheck/ticket/1464
2010-03-03 23:02:32 +02:00
Daniel Marjamäki
e207da18a2
STL: don't warn about the suspicious string::find condition because it's not always a bug
2010-03-03 17:11:31 +01:00
Reijo Tomperi
75c0ed7e6e
Add simple debug print to make it possible to detect cases where template simplification goes wrong.
...
http://sourceforge.net/apps/trac/cppcheck/ticket/1464
2010-03-02 23:55:05 +02:00
Daniel Marjamäki
e064208f54
Preprocessor: Removed unused function renameMacroVariables
2010-02-28 16:10:21 +01:00
Daniel Marjamäki
9b1e6c80ed
STL: refactorings
2010-02-28 08:03:22 +01:00
Daniel Marjamäki
248b6aa159
cleanup: removed unused variables
2010-02-28 07:38:07 +01:00
Daniel Marjamäki
6ca4b008d0
null pointer: Fixed better error message for 'possible null pointer' + removed redundant check in our Tokenizer.
2010-02-28 07:26:50 +01:00
Daniel Marjamäki
4407aabe55
STL: suspicious condition when using std::find
2010-02-28 07:04:58 +01:00
Daniel Marjamäki
980a810995
STL if find: check given severity
2010-02-28 06:56:47 +01:00
Reijo Tomperi
88840e6a08
Fix #1453 (possible infinite loop processing GNU Go's engine/montecarlo.c)
...
http://sourceforge.net/apps/trac/cppcheck/ticket/1453
2010-02-27 23:47:56 +02:00
Daniel Marjamäki
4de700c9de
STL: suspicious condition when using find on strings and containers
2010-02-27 21:26:11 +01:00
Daniel Marjamäki
50210857a6
Fixed #1439 (false positive: memory leak when using realloc)
2010-02-27 19:41:14 +01:00
Daniel Marjamäki
c9ff53fbed
Refactoring error messages
2010-02-27 17:06:33 +01:00
Daniel Marjamäki
0a2f631b14
Fixed #1448 (Trying to check Unicode file prints confusing error)
2010-02-27 13:08:59 +01:00
Daniel Marjamäki
a8ee4a03f0
Fixed #1456 (PATCH: Variable hides typedef with same name false positive)
2010-02-27 07:27:51 +01:00
Daniel Marjamäki
ce0131a1e6
Fixed #1397 (false positive: Memory leak in while loop)
2010-02-26 22:14:56 +01:00
Reijo Tomperi
9b6336013b
Fix #1455 (Preprocessor: Wrong line number in "No pair for character" error)
...
http://sourceforge.net/apps/trac/cppcheck/ticket/1455
2010-02-26 23:11:23 +02:00
Robert Reif
54bf67e766
Fixed #1456 (PATCH: Variable hides typedef with same name false positive)
2010-02-26 21:43:00 +01:00
Robert Reif
f4d600e93b
Fixed #1457 (PATCH: Variable hides enumerator with same name false negative)
2010-02-26 21:40:57 +01:00
Kimmo Varis
d064d38d35
Fix comment.
2010-02-26 13:21:27 +02:00
Daniel Marjamäki
377d3091a9
Fixed #1452 (Simplify goto better)
2010-02-25 20:03:39 +01:00
Robert Reif
0da133f8a0
Fixed #1451 (false positive: operator = should return reference to self)
2010-02-25 07:26:59 +01:00
Robert Reif
f9d444ed52
Fixed #1445 (segfault in Tokenizer::simplifyRedundantParanthesis())
2010-02-25 07:24:32 +01:00
Robert Reif
7d8adfb4df
Fixed #1449 (segmentation fault of cppcheck)
2010-02-24 17:50:02 +01:00
Robert Reif
d9df3d5c6e
Fixed #1434 (### Internal error in Cppcheck. Please report it.)
2010-02-23 22:12:55 +01:00
Daniel Marjamäki
4ef68546ef
Merge branch 'master' of git@github.com:danmar/cppcheck
2010-02-23 21:27:26 +01:00
Daniel Marjamäki
5254822bed
dmake: generate the lib/lib.pri file
2010-02-23 21:27:01 +01:00
Reijo Tomperi
edf76c77fa
Attempt to fix : #1425 : -I doesn't work properly in Windows
...
http://sourceforge.net/apps/trac/cppcheck/ticket/1425
2010-02-23 21:28:40 +02:00
Daniel Marjamäki
8e58cfcd32
Removed cmake/scons files
2010-02-23 18:14:33 +01:00
Daniel Marjamäki
0b2ad2164f
Fixed #1442 (false positive: getting offset instead of dereferencing a null pointer)
2010-02-22 21:30:21 +01:00
Daniel Marjamäki
8f4edb5e45
Fixed #1409 (False positive: Buffer access out-of-bounds with strncpy and an array in typedef'ed struct)
2010-02-21 15:23:50 +01:00
Daniel Marjamäki
d5611a1a06
Fixed #1426 (false positive: returning LPVOID can be const)
2010-02-21 10:19:28 +01:00
Daniel Marjamäki
459a3bac50
Fixed #1396 (false positive: Resource leak)
2010-02-21 09:47:41 +01:00
Daniel Marjamäki
e4a685c6e9
Fixed #1430 (void foo(int nb))
2010-02-21 08:02:44 +01:00
Daniel Marjamäki
a25cdd63b6
Refactored the CheckOther::functionVariableUsage
2010-02-21 07:05:44 +01:00
Daniel Marjamäki
7a72932078
Tokenizer: simple simplification of array sizes
2010-02-20 18:13:09 +01:00
Daniel Marjamäki
e4cc8cf1a0
Fixed #1395 (false positive: Possible null pointer dereference)
2010-02-20 15:50:44 +01:00
Daniel Marjamäki
ccef1d6eb5
Fixed #1424 (false positive: unintialized variable)
2010-02-20 13:24:50 +01:00
Daniel Marjamäki
084b21494a
Fixed #1422 (false positive: uninitialized variable)
2010-02-20 11:43:53 +01:00
Daniel Marjamäki
a6c9a6fc54
Fixed #1407 (false positive memory leak when returning pointer to the allocated memory)
2010-02-20 10:17:45 +01:00
Daniel Marjamäki
d0348fa57a
Fixed #1403 (false positive: The function can be const)
2010-02-20 09:55:51 +01:00
Daniel Marjamäki
6a03fa604c
Fixed #1402 (false positive: uninitialized variable)
2010-02-20 09:35:57 +01:00
Robert Reif
24628013f1
Fixed #1427 (new check: check for typedef name hiding)
2010-02-20 09:07:29 +01:00
Daniel Marjamäki
57f63f65c2
Borland C++: Fixed compiler errors (operands must be same type)
2010-02-20 08:53:33 +01:00
Daniel Marjamäki
8411f449f8
Refactoring: Using string::compare instead of strncmp
2010-02-19 07:29:27 +01:00
Daniel Marjamäki
6b8cb08ec6
Refactoring CheckBufferOverrun. Use std::string instead of const char *
2010-02-18 22:25:29 +01:00
Daniel Marjamäki
375d2b1fcd
astyle formatting
2010-02-18 19:55:47 +01:00
Daniel Marjamäki
b59d79c303
readded checks for unused variables and unreachable code that were removed in 42c608b6f0
2010-02-18 18:45:13 +01:00
Robert Reif
5c6ec0364d
Fixed #1411 (### Internal error in Cppcheck. Please report it.)
2010-02-18 07:24:24 +01:00
Robert Reif
9e61e7dda8
Fixed #1405 (false positive: operator = should return reference t
2010-02-17 22:46:03 +01:00
Robert Reif
deb71fc566
Fixed #1405 (false positive: operator = should return reference to itself)
2010-02-17 22:42:08 +01:00
Daniel Marjamäki
db2c362604
Fixed #1389 (false positive: uninitialized variable)
2010-02-17 18:10:50 +01:00
Robert Reif
f15c408f13
Fixed #1388 (enum token/template parameter confusion - False positive)
2010-02-16 07:33:23 +01:00
Reijo Tomperi
e44f0b1b8d
Fix #1392 (Segfault in CheckBufferOverrun::checkScope)
...
http://sourceforge.net/apps/trac/cppcheck/ticket/1392
2010-02-15 23:20:09 +02:00
Monika Lukow
e9e5174797
Fixed #1333 (Detect access out of bounds 'for (i = 100; i > 0; --i) a[i] = 0;')
2010-02-14 23:10:15 +01:00
Reijo Tomperi
6643d39929
Remove unnecessary file open.
2010-02-14 21:55:21 +02:00
Reijo Tomperi
7f2871d353
astyle fix
2010-02-14 21:46:40 +02:00
Daniel Marjamäki
9394816fcf
Refactoring: Use std::string instead of const char *
2010-02-14 19:58:17 +01:00
Reijo Tomperi
ba00e031c0
Added %name% pattern to Token.
...
Currenly same as %var%, but in the future %var% is supposed to match only tokens that have varid != 0.
2010-02-12 23:40:05 +02:00
Reijo Tomperi
17b8d025a3
Fix operator= warning from our own code.
2010-02-12 22:38:17 +02:00
Reijo Tomperi
b52fa9451f
Fix #1385 (False positive: unsigned division)
...
http://sourceforge.net/apps/trac/cppcheck/ticket/1385
This also fixes a bug in setVarId(). "unsigned int a" didn't get varid,
untill later when unsigned was simplified away.
2010-02-12 22:24:06 +02:00
Daniel Marjamäki
669fe1b23d
Fixed #1382 (False positive: uninitialized variable when using assembly to initialize variable)
2010-02-12 18:15:15 +01:00
Reijo Tomperi
2a78637da7
Fix #1340 (False positive: Array out of bounds for re-initialised array pointer)
...
http://sourceforge.net/apps/trac/cppcheck/ticket/1340
2010-02-10 23:11:08 +02:00
Daniel Marjamäki
0a6aa0f094
Fixed #1376 (Member variable not initialized in the constructor false positive)
2010-02-10 19:28:51 +01:00
Reijo Tomperi
faced1b483
Possibly fix #1369 (Internal error - double-declared enum followed by another enum)
...
http://sourceforge.net/apps/trac/cppcheck/ticket/1369
Don't include same file twice if one is a/a.h and other is a/../a/a.h
2010-02-09 22:26:15 +02:00
Reijo Tomperi
45abd2d7fc
Fix #1366 (void Tokenizer::simplifyTemplates() --> Abort)
...
http://sourceforge.net/apps/trac/cppcheck/ticket/1366
2010-02-09 00:16:12 +02:00
Daniel Marjamäki
8853f304af
Fixed #1364 (False positive: (error) Possible null pointer dereference)
2010-02-08 18:25:08 +01:00
Daniel Marjamäki
19589adc1d
Fixed #1360 (false positive:: uninitialized class member of nested class inside a function)
2010-02-08 18:06:28 +01:00
Robert Reif
9591e09dd0
Fixed #1344 (false negative: missing const not found)
2010-02-08 07:25:19 +01:00
Monika Lukow
2d5d060514
Fixed #1094 (Improve check: unusual pointer arithmetic: 'ch+str')
2010-02-07 21:44:11 +01:00
Daniel Marjamäki
cd5b95849d
Fixed #1361 (### Internal error in Cppcheck. Please report it)
2010-02-07 15:00:19 +01:00
Daniel Marjamäki
fb09b2fd37
Fixed #1356 (Double-False positive: uninitialized variable)
2010-02-07 13:34:39 +01:00
Daniel Marjamäki
1b0c81a24b
Tokenizer: Fixed bug in setVarId. functions should never have a variable id
2010-02-07 13:04:33 +01:00
Daniel Marjamäki
ed8f3bc806
Fixed #1362 (Internal error when using ?-operator and nested {})
2010-02-07 09:14:59 +01:00
Daniel Marjamäki
93bb1c0174
astyle formatting
2010-02-06 23:51:29 +01:00
Daniel Marjamäki
e1b54df368
Fixed #1346 (False positive: Memory leak when allocated memory is stored elsewhere inside a condition)
2010-02-06 22:35:36 +01:00
Daniel Marjamäki
71117378ef
Fixed #1363 (false positive: memory leak)
2010-02-06 21:47:52 +01:00
Daniel Marjamäki
ebf36c1150
Fixed #824 (Exit code of cppcheck)
2010-02-06 19:47:08 +01:00
Daniel Marjamäki
bdfad4eb3f
fixed null pointer dereference when using --errorlist
2010-02-06 19:45:56 +01:00
Daniel Marjamäki
0a31e5e3ee
Fixed #1352 (false positive: uninitialized variable)
2010-02-06 16:51:32 +01:00
Daniel Marjamäki
70620b6f80
Borland C++: Fixed compiler error. When using 'a?b:c', Borland C++ requires that 'b' and 'c' has the same types
2010-02-06 10:39:16 +01:00
Robert Reif
b78845174d
Fixed #1355 (Fixed enum bug when expression contain comma)
2010-02-06 09:49:56 +01:00
Daniel Marjamäki
cbc853fdba
Partial fix for #322 (get configurations from headers that don't start at the beginning of the file)
2010-02-06 09:30:48 +01:00
Reijo Tomperi
9852ab86e9
Fix #1358 (False negative: out-of-bounds not found near return)
...
http://sourceforge.net/apps/trac/cppcheck/ticket/1358
2010-02-05 23:55:10 +02:00
Daniel Marjamäki
0d18050b55
Fixed #984 (improve output if strncpy is followed by strncat)
2010-02-05 17:35:18 +01:00
Robert Reif
6cbfc5f894
Fixed #1351 (add expression support to simplifyEnum)
2010-02-05 07:37:17 +01:00
Daniel Marjamäki
9e6ea07c14
CheckClass::noMemset: Refactoring so it handles more complex std template types
2010-02-04 21:49:58 +01:00
Daniel Marjamäki
da7e75f69e
Class checking: Minor refactoring when analysing memset on class
2010-02-04 20:53:04 +01:00
Daniel Marjamäki
9943262da0
Fixed #1287 (Use of memset on struct - std template types not handled)
2010-02-04 19:40:35 +01:00
Daniel Marjamäki
0ba665d77f
Fixed #1337 (Division by zero with __alignof__())
2010-02-03 21:23:44 +01:00
Daniel Marjamäki
d3b5889f88
Fixed #1345 (Not initialised variables warning missing in classes with dllexport)
2010-02-03 20:01:56 +01:00
Daniel Marjamäki
b01af012cd
Fixed #1342 (Superclass constructors in initializer lists are considered unused functions when superclass has a namespace.)
2010-02-03 18:37:48 +01:00
Robert Reif
f2eac901c0
Fixed #1343 (simplifyTypedef doesn't support deeply nested classes)
2010-02-03 07:58:36 +01:00
Daniel Marjamäki
4ec94116f5
Fixed #1341 (false positive 'uninitialized variable' when using Exception specifications)
2010-02-02 19:56:41 +01:00
Robert Reif
b704fc7bc7
Fixed #1339 (add nested struct support to simplifyEnum and simplifyTypedef)
2010-02-01 19:59:24 +01:00
Daniel Marjamäki
1b9afc82a4
Reverted 4f30468c80
. There was false positives such as #1335 so please fix them and then re-commit.
2010-02-01 19:46:51 +01:00
Robert Reif
64afcc8179
Fixed #1338 (simplify typedefs with global and nested namespace)
2010-01-31 21:46:18 +01:00
Daniel Marjamäki
1375a60e3f
Fixed #1004 (improve check: Unintialized variable not detected when using a reference (&))
2010-01-31 16:29:12 +01:00
Monika Lukow
25822dff24
Fixed #1249 (false positive '(error) Resource leak: f' for 'popen' / 'if(pclose(f) < 0)' sequence)
2010-01-31 11:44:30 +01:00
Monika Lukow
a0e96be0c3
Fixed #1274 (false positive: Dangerous usage of strncat)
2010-01-31 11:43:54 +01:00
Monika Lukow
4f30468c80
Fixed #1094 (Improve check: unusual pointer arithmetic: 'ch+str')
2010-01-31 11:42:02 +01:00
Daniel Marjamäki
1a59e1bc68
Tokenizer: remove redundant assignments and variables
2010-01-31 09:52:19 +01:00
Daniel Marjamäki
e15a16eb15
Tokenizer: Remove redundant assignments and variables
2010-01-31 09:33:57 +01:00
Daniel Marjamäki
e1efad0c27
Tokenizer: remove the keyword 'inline'
2010-01-31 08:11:29 +01:00
Robert Reif
d17d199415
Tokenizer: fix for multiple array definitions for a single typedef
2010-01-31 07:16:19 +01:00
Robert Reif
630d9ba552
Fixed #1326 (remove simplified enum definitions)
2010-01-31 07:13:09 +01:00
Robert Reif
7cbdb9f8a1
Fixed #1331 (simplify typedef of complex arrays)
2010-01-30 19:41:22 +01:00
Daniel Marjamäki
48f3921c36
Null pointer dereference: sending to output stream
2010-01-30 14:40:33 +01:00
Daniel Marjamäki
8716c771a4
Tokenizer: improved the simplifyInitVar
2010-01-30 14:25:11 +01:00
Daniel Marjamäki
3b08712930
Fixed #1005 (improve check: nullpointer dereference not found when it is initialized with NULL-cast)
2010-01-30 09:33:16 +01:00
Robert Reif
882e2225e0
Fixed 1329 (simplify typedef of function pointer returning template)
2010-01-30 08:00:11 +01:00
Daniel Marjamäki
f9d5fb3191
Fixed #1327 (False positive: Redundant code: Found a statement that begins with numeric constant)
2010-01-29 22:28:49 +01:00
Reijo Tomperi
6e48f57826
Remove debug print
2010-01-29 23:24:16 +02:00
Reijo Tomperi
1d5ba4e320
Improved updateClassList(), but not yet took it into use.
...
findClassFunction is now non-static.
updateClassList usage is currently commented out as it doesn't handle class inside a function
2010-01-29 23:22:18 +02:00
Daniel Marjamäki
f561441d90
Fixed #1319 (false negative: missing const not found)
2010-01-29 19:38:56 +01:00
Daniel Marjamäki
53f514fc5c
Tokenizer: Fixed const simplification
2010-01-29 19:34:43 +01:00
Robert Reif
94c5d92b2b
Fixed #1323 (segfault with style in CheckClass::operatorEqRetRefThis())
2010-01-29 16:04:27 +01:00
Robert Reif
19bb2940cc
Fixed #1325 (Segmentation fault in simplifyTypedef due to bad preprocessing)
2010-01-29 16:00:48 +01:00
Robert Reif
fc54ed1eef
Fixed #1326 (remove simplified enum definitions)
2010-01-29 15:57:26 +01:00
Daniel Marjamäki
9d11492845
Fixed #1286 (Memory leak not detected)
2010-01-27 22:05:04 +01:00
Daniel Marjamäki
15b4abd6d3
killerbot: Fixed #1314 (specify the files to check in 1 input file)
2010-01-27 21:43:01 +01:00
Daniel Marjamäki
e49f7bfa0e
Fixed #1315 (mismatched allocation and deallocaton not detected)
2010-01-27 21:02:13 +01:00
Daniel Marjamäki
7ec27cb43b
updated --doc output about new checks in 1.40
2010-01-27 19:25:48 +01:00
Daniel Marjamäki
1c84dc814c
Auto variables: Improved handling of temporaries
2010-01-27 19:16:32 +01:00
Robert Reif
45b6b9e5a1
Fixed #1316 (### Internal error in Cppcheck. Please report it.)
2010-01-27 19:03:24 +01:00
Daniel Marjamäki
32fcb8fe18
Auto variables: returning pointer to temporary .c_str() data
2010-01-26 22:11:34 +01:00
Daniel Marjamäki
fa305d70bc
Fixed #1302 (False positive: Confusion between POSIX open() and class member)
2010-01-26 20:10:52 +01:00
Daniel Marjamäki
db0466eb19
Fixed #1278 (Confusing style message formatting)
2010-01-26 19:37:22 +01:00
Daniel Marjamäki
e12d115e9a
Fixed #1312 (false positive: missing const message on functions returning references)
2010-01-25 21:40:57 +01:00
Robert Reif
8be8c266ac
Fixed #1313 (unnamed enums not simplified properly)
2010-01-25 07:45:16 +01:00
Robert Reif
989e8393e4
Fixed #1307 (Internal error with typedef in parameter list)
2010-01-24 22:40:35 +01:00
Daniel Marjamäki
724c55b32a
Memory leaks: some refactorings and minor improvements
2010-01-24 21:48:39 +01:00
Daniel Marjamäki
65881b9346
Fixed #1238 (False Negative : memory leak with template class)
2010-01-24 20:04:09 +01:00
Daniel Marjamäki
6d9740adea
Tokenizer: Fixed Tokenizer::simplifyKnownVariable bug when the variable is re-assigned in a loop
2010-01-24 19:27:39 +01:00
Daniel Marjamäki
7ce4825f95
Fixed #1308 (False positive: The function 'x' can be const for a static member function)
2010-01-24 18:26:39 +01:00
Daniel Marjamäki
25ba399a50
const class functions: refactorings
2010-01-24 13:45:56 +01:00
Daniel Marjamäki
b4b97e5706
const: fixed false positive when using increment/decrement
2010-01-24 13:33:30 +01:00
Reijo Tomperi
24052c16b4
Fix some style errors found from our own code.
2010-01-23 23:44:08 +02:00
Daniel Marjamäki
a0d8f44603
CheckClass: The operator< etc member functions can often be const
2010-01-23 22:36:04 +01:00
Reijo Tomperi
7817d5b142
Fix #1279 (Change error message: Invalid number of character ({). Can't process file.)
...
http://sourceforge.net/apps/trac/cppcheck/ticket/1279
2010-01-23 23:18:11 +02:00
Daniel Marjamäki
4d7ac2f82e
STL: fixed false positive when using erase
2010-01-23 22:03:38 +01:00
Daniel Marjamäki
43c8fe895c
Fixed #1301 (False positive: Data is allocated but not initialized)
2010-01-23 21:25:17 +01:00
Daniel Marjamäki
aab05524e5
Fixed #1305 (False positive: The function 'x' can be const when indirectly calling a non-const member)
2010-01-23 21:08:40 +01:00
Daniel Marjamäki
9a6b450501
Fixed #1304 (False positive: The function 'x' can be const when modifing a member)
2010-01-23 20:59:20 +01:00
Daniel Marjamäki
5b76be4935
Fixed #1303 (False positive: The function 'x' can be const for a constructor)
2010-01-23 20:47:29 +01:00
Daniel Marjamäki
f62466493b
New Check: Detect return of invalid reference
2010-01-23 20:39:12 +01:00
Daniel Marjamäki
fb10396cb3
only run CheckClass::checkConst if style checking is on
2010-01-23 09:38:35 +01:00
Daniel Marjamäki
35c303943f
Partial fix for #13 - detect simple cases of member functions that can be const
2010-01-23 09:19:22 +01:00
Daniel Marjamäki
037ecffc34
detect when function pointer that is null is used
2010-01-23 09:15:30 +01:00
Daniel Marjamäki
7b986c831d
Report when using uninitialized function pointer
2010-01-23 07:57:57 +01:00
Daniel Marjamäki
8a9eba980b
Function pointers: re-enabled the simplifyFunctionPointers
2010-01-23 07:43:12 +01:00
Robert Reif
13ca2510cc
Fixed #1298 ((error) ### Internal error in Cppcheck. Please report it. (typedef in fun proto))
2010-01-22 20:26:07 +01:00
Daniel Marjamäki
1552c0f7f2
Fixed #1276 (False Uninitialized variable when using goto)
2010-01-22 20:20:43 +01:00
Daniel Marjamäki
e9c8e1d8b1
doxygen and minor refactorings
2010-01-22 19:29:24 +01:00
Daniel Marjamäki
59de7934b7
Fixed #643 (Member variable not initialized not detected if any unknown function called)
2010-01-22 18:51:25 +01:00
Robert Reif
9f853cb164
Fixed #1297 (typedef causes internal error in vlc/modules/access/imem.c)
2010-01-22 17:27:40 +01:00
Daniel Marjamäki
d4b13eee9f
Fixed #1290 (1.40: Internal error)
2010-01-21 20:05:32 +01:00
Daniel Marjamäki
2e707974d0
Fixed #1273 (scope of variable limited not detected in latest versions)
2010-01-21 18:50:56 +01:00
Robert Reif
9f0b9551cf
This patch simplifies the function pointer return type code and allows more complex return types.
2010-01-21 18:01:09 +01:00
Robert Reif
e9e64033e7
Improved typedef simplification of function pointers
2010-01-21 07:51:08 +01:00
Daniel Marjamäki
a6e81c2ee7
Fixed #1293 (Things to add to call_func_white_list)
2010-01-20 22:03:06 +01:00
Daniel Marjamäki
3447030564
Merge branch 'master' of git@github.com:danmar/cppcheck
2010-01-20 21:19:32 +01:00
Daniel Marjamäki
96359b14ff
Simplify function pointers
2010-01-20 21:19:06 +01:00
Robert Reif
e163f878ab
Handle/simplify function pointer typedefs
2010-01-20 21:16:40 +01:00
Reijo Tomperi
b83d257852
Fix #1296 (false positive: index out of bounds)
...
http://sourceforge.net/apps/trac/cppcheck/ticket/1296
2010-01-20 21:26:54 +02:00
Daniel Marjamäki
85fcd4c9a9
Fixed #1282 (False positive for a memory leak in a simple loop)
2010-01-19 19:08:03 +01:00
Daniel Marjamäki
f49cc7f0ff
CheckMemoryLeak: Added 'scanf' and 'sscanf' to the whitelist
2010-01-18 21:58:27 +01:00
Daniel Marjamäki
32604dd55e
Fixed #1266 ('qsort' missing in call_func_white_list)
2010-01-18 21:34:11 +01:00
Daniel Marjamäki
53d036fadf
Added Cppcheck::terminate function that will terminate the checking ASAP
2010-01-18 20:23:50 +01:00
Robert Reif
cd31cd9298
Fixed #1251 (tokenize typedef of reference)
2010-01-18 19:06:50 +01:00
Daniel Marjamäki
fbf428550a
Fixed #1262 (cppcheck false positives: 'Possible null pointer dereference', 'Uninitialized variable')
2010-01-17 19:08:45 +01:00
Daniel Marjamäki
f3e25a5244
Fixed doxygen error messages
2010-01-17 16:38:28 +01:00
Daniel Marjamäki
25bf50755e
Reformatting the --doc output to work better in the wiki
2010-01-17 14:56:56 +01:00
Daniel Marjamäki
5595a17e41
Updated version to 1.40
2010-01-17 13:52:28 +01:00
Robert Reif
70dbb8ba17
Fixed #1275 (Cppcheck hangs when analysing the code 'typedef struct { } A, *B, **C;')
2010-01-17 08:16:17 +01:00
Daniel Marjamäki
fbefb8df34
Fixed #1272 (links in typedef not handled correctly)
2010-01-16 19:42:37 +01:00
Daniel Marjamäki
0a8ca1f160
Fixed #1271 (SIGSEGV on malformed source (macro stub + fundef))
2010-01-16 13:56:57 +01:00
Robert Reif
a0caea4ee6
Refactoring the handling of typedefs
2010-01-16 09:18:21 +01:00
Daniel Marjamäki
81ca6e9f98
Revert "minor tweak in Borland C++ project file"
...
This reverts commit ad06ee4f71
.
2010-01-16 08:47:46 +01:00
Daniel Marjamäki
ad06ee4f71
minor tweak in Borland C++ project file
2010-01-16 08:17:40 +01:00
Reijo Tomperi
d37864f8c4
Fix part of #1262 (cppcheck false positives: 'Possible null pointer dereference'
...
http://sourceforge.net/apps/trac/cppcheck/ticket/1262
2010-01-15 23:46:47 +02:00
Daniel Marjamäki
f591d8f8e1
refactoring
2010-01-14 22:04:58 +01:00
Daniel Marjamäki
7059dd5693
astyle formatting
2010-01-14 22:01:59 +01:00
Daniel Marjamäki
b9f09679c7
lanurmi: Fixed #1269 (Changes required for compiling with Sun's compiler)
2010-01-14 22:00:14 +01:00
Daniel Marjamäki
ac077d3160
Fixed #1264 (False positive: Resource leak with if-else in while)
2010-01-14 21:41:50 +01:00
Daniel Marjamäki
a7bddc8fd3
Fixed #1268 (Null pointer dereference false positive)
2010-01-14 20:02:38 +01:00
Daniel Marjamäki
bc5800004b
wrote comments about the preprocessor
2010-01-13 21:50:44 +01:00
Daniel Marjamäki
cefa695dba
Fixed #1265 ((error) Uninitialized variable on macro expansion)
2010-01-13 19:37:55 +01:00
Robert Reif
0212225859
Tokenizer: fixed typedef issues
2010-01-13 07:59:47 +01:00
Daniel Marjamäki
1aac8f3e52
Uninitialized variables: disable subfunction analysis if multiple threads are used
2010-01-12 22:33:47 +01:00
Daniel Marjamäki
0638bc2112
CheckMemoryLeaks: Added 'strlen' to white list
2010-01-12 22:10:59 +01:00
Daniel Marjamäki
fd5e3e63b8
Fixed #1258 ('fscanf' missing in call_func_white_list)
2010-01-12 21:56:22 +01:00
Daniel Marjamäki
2de49129dc
Fixed #1259 (false postive: Member variable 'A::b' is not assigned a value in 'A::operator=')
2010-01-12 21:36:40 +01:00
Daniel Marjamäki
2358c51694
Tokenizer: some cleanup of std::
2010-01-12 21:25:31 +01:00
Daniel Marjamäki
374def4a53
Fixed #1070 (Improve scope error message)
2010-01-12 19:34:33 +01:00
Daniel Marjamäki
814eb6caee
Fixed #1257 (potential leaks not reported becauseof 'continue' in loop)
2010-01-12 19:12:08 +01:00
Robert Reif
5e8e4fd3e9
Fixed #1252 (Internal error in Cppcheck while parsing struct)
2010-01-12 17:38:36 +01:00
Robert Reif
7b6bf80057
Fixed #1250 (tokenize typedef of union)
2010-01-11 22:58:57 +01:00
Daniel Marjamäki
d3b7f5931f
Fixed #1174 (improve check: Unintialized variable not detected in subfunction)
2010-01-11 22:28:07 +01:00
Daniel Marjamäki
c666a9662b
BufferOverrun: negative index is out of bounds
2010-01-11 21:18:07 +01:00
Daniel Marjamäki
b8b6b0ec32
Uninitialized variables: fixed false positives when using pointer aliasing
2010-01-11 19:25:01 +01:00
Robert Reif
94d5e32aa1
Fixed #1248 (tokenize typedef of array)
2010-01-11 17:09:04 +01:00
Daniel Marjamäki
8be54b592d
ExecutionPath: better handling of for/while/do/switch, it doesn't bail out everything
2010-01-10 22:05:51 +01:00
Daniel Marjamäki
c5966bba59
Fixed #1225 (false negative :: uninitialized variable not detected when using enums)
2010-01-10 20:36:15 +01:00
Daniel Marjamäki
3fb420cbf0
fixed unlogged errors from the tokenizer and also some errors reported by valgrind
2010-01-10 20:03:46 +01:00
Daniel Marjamäki
a50ec2eded
memory leaks: better handling of loops and switch
2010-01-10 15:40:50 +01:00
Daniel Marjamäki
f65bf6d565
Fixed #1220 (False memory leak when using while)
2010-01-10 14:00:32 +01:00
Daniel Marjamäki
3fabe53570
Memory leaks: Better handling of switch
2010-01-10 10:37:54 +01:00
Daniel Marjamäki
b82cb2e41e
Fixed #1218 (Improve check: incrementing uninitialized variable i++)
2010-01-10 09:09:37 +01:00
Robert Reif
19ba151531
Fixed #1244 (tokenize typedef of unnamed struct)
2010-01-10 08:49:02 +01:00
Daniel Marjamäki
4c641ed80c
Fixed #1189 (false negative: using uninitialized variable i 'a[i] = 0;')
2010-01-09 22:26:05 +01:00
Daniel Marjamäki
0908728601
Fixed #1231 (Preprocessor: Fail to evaluate '#if ! defined _ABCD_')
2010-01-09 21:54:20 +01:00
Daniel Marjamäki
6ec5b797ab
Borland C++: Fixed compiler error
2010-01-09 10:24:35 +01:00
Daniel Marjamäki
2dd0907146
fixed segmentation fault
2010-01-08 21:54:24 +01:00
Daniel Marjamäki
ca74f57fd0
Fixed #1237 (Uninitialized variable false positive for return-value pattern in pan source code.)
2010-01-08 21:24:48 +01:00
Robert Reif
60ef3ef872
Fixed #1233 (false positive: operator = should check for assignment to self)
2010-01-08 19:15:24 +01:00
Daniel Marjamäki
686137415f
Fixed #1235 (CheckMemoryLeakInFunction: Wrong handling of 'fcloseall')
2010-01-07 21:36:51 +01:00
Robert Reif
b30b07beee
Fixed #1232 (segmentation fault of cppcheck when scanning templates)
2010-01-07 18:09:35 +01:00
Daniel Marjamäki
b366dba682
After suggestion from Jim Vollner, remove dead pointers from the used list
2010-01-06 21:29:39 +01:00
Daniel Marjamäki
94b0cbbcff
uncomment validation of Tokenizer::_tokensBack
2010-01-06 21:18:42 +01:00
Daniel Marjamäki
57d1da3910
Ticket #1228 : Handle tokensBack in the Token class. When adding&removing tokens the Token class can make sure that this pointer is updated accordingly. It is very important that the tokensBack has the same scope as the token list, otherwise there will be a dead pointer problem.
2010-01-06 20:19:27 +01:00
Daniel Marjamäki
485f3c7708
Fixed #1221 ([False positive] Member variable not initialized with operator[] gives wrong result)
2010-01-06 19:04:15 +01:00
Reijo Tomperi
ff0573998a
Added more validating code to tokenizer. Currently commented out.
2010-01-06 01:32:05 +02:00
Robert Reif
e6cc897e29
Fixed #1224 (segmentation fault of cppcheck)
2010-01-05 21:55:33 +01:00
Robert Reif
13f627d0d5
Fixed #1215 (are enums processed properly?)
2010-01-04 17:22:06 +01:00
Kimmo Varis
488ea55358
CMake - add header files to lib project (and to VS project).
2010-01-03 21:08:49 +02:00
Daniel Marjamäki
e248f7d3e5
Fixed #1023 (improve check: Unintialized variable not detected when using +=)
2010-01-03 18:49:13 +01:00
Daniel Marjamäki
e286896d75
Fixed #1216 (false positive: uninitialized variable when using exit|abort)
2010-01-03 15:35:32 +01:00
Daniel Marjamäki
fa535ff3ae
Fixed #440 (NULL referencing not detected)
2010-01-03 13:30:20 +01:00
Robert Reif
2a546dc9c0
Fixed #1184 (improve test: operator =)
2010-01-03 08:26:02 +01:00
Daniel Marjamäki
1032eb2449
Fixed #1214 (false positive: uninitialized variable 'bool fixed = std::ios_base::fixed;')
2010-01-03 08:03:28 +01:00
Daniel Marjamäki
38b480a4b5
Fixed #1203 (Preprocessor: Doesn't handle macros usage that contain ';')
2010-01-02 20:54:52 +01:00
Daniel Marjamäki
d82079e86f
Fixed #1209 (False positive: uninitialized variable c when it is initialized with 'ab(sizeof(xyz), &c)')
2010-01-02 18:16:44 +01:00
Robert Reif
bcafb30d0d
Fixed #1211 (add struct support for constructor checks)
2010-01-02 17:29:55 +01:00
Daniel Marjamäki
2e62a3f4c7
Fixed #1202 (false positive: uninitialized variable when using 'do')
2010-01-02 09:08:36 +01:00
Daniel Marjamäki
6af5e434d8
Fixed #1204 (Tokenizer::findClassFunction broken)
2010-01-02 08:33:54 +01:00
Slava Semushin
82ae064218
Fixed #1013 (autovariables: detect when assigning parameter **par)
...
http://sourceforge.net/apps/trac/cppcheck/ticket/1013
2010-01-02 03:53:34 +06:00
Slava Semushin
b816968f28
Fixed #1197 (Segmentation fault when we define function which was already defined by preprocessor)
...
http://sourceforge.net/apps/trac/cppcheck/ticket/1197
2010-01-02 03:25:37 +06:00
Daniel Marjamäki
ddfd0b948e
Fixed #1178 (1.39: Internal error)
2010-01-01 21:06:30 +01:00
Daniel Marjamäki
071b7b463d
Fixed #1200 (false positive 'uninitialized variable' when using throw)
2010-01-01 20:12:39 +01:00
Daniel Marjamäki
b0d7623dcf
refactoring the fix for #1191
2010-01-01 19:49:33 +01:00
Daniel Marjamäki
f8bd59f5b5
Fixed #1191 (false positive: uninitialized variable)
2010-01-01 19:43:02 +01:00
Daniel Marjamäki
77c5b793c9
Fixed #1196 (Hang: Cppcheck hang for the file linux-2.6/drivers/crypto/hifn_795x.c)
2010-01-01 13:26:54 +01:00
Daniel Marjamäki
7ecd333ffa
Fixed #1188 (false negative: dereferencing p, which is a null pointer 'int y = 5 + *p')
2009-12-31 20:00:20 +01:00
Daniel Marjamäki
e0ecef5d71
fixed a hang in Tokenizer::simplifyFunctionParameters
2009-12-31 19:31:21 +01:00
Robert Reif
12641e2d76
Fixed #1184 (improve test: operator =)
2009-12-31 13:44:03 +01:00
Daniel Marjamäki
f797794601
fixed cppcheck warning
2009-12-31 13:34:43 +01:00
Daniel Marjamäki
ee1675270b
Fixed #1181 (Preprocessor fails while expanding macros)
2009-12-31 12:45:17 +01:00
Daniel Marjamäki
0159287437
Fixed #1183 (False positive: uninitialized variable p 'd = bar(sizeof(*p));')
2009-12-31 09:10:20 +01:00
Daniel Marjamäki
0ee3d7e46a
Fixed #1182 (False positive: uninitialized variable 'int *pa = &a;')
2009-12-30 21:42:15 +01:00
Daniel Marjamäki
6c0919d9bd
Fixed #1173 (Improve check: memory leak not detected in constructor)
2009-12-30 21:29:54 +01:00
Robert Reif
f8f0a31e41
Fixed #1167 (### Internal error in Cppcheck. Please report it.)
2009-12-30 20:56:16 +01:00
Daniel Marjamäki
71a83647c6
cleanup
2009-12-30 20:38:16 +01:00
Daniel Marjamäki
ae3ff7d376
Fixed #1087 (uninitialized data not detected 'char z = *str')
2009-12-30 20:37:11 +01:00
Daniel Marjamäki
461d826eff
Fixed #1105 (improve check: uninitialized variable not detected for 'a = a')
2009-12-30 20:15:44 +01:00
Robert Reif
3a46ef0487
Fixed #1176 (void operator = check doesn't support struct)
2009-12-30 18:40:02 +01:00
Daniel Marjamäki
d83131ca92
Fixed #1041 (passing a nullpointer to a reference)
2009-12-30 17:42:41 +01:00
Daniel Marjamäki
a7ab47bb98
Fixed #1067 (Tokenizer: K&R style function that returns function pointer)
2009-12-30 15:12:38 +01:00
Daniel Marjamäki
06ee643c6a
Fixed #1177 (False positive: pointer is not dereferenced 'sizeof(*p)')
2009-12-30 11:32:46 +01:00
Daniel Marjamäki
2de2ecafe4
Fixed #1168 (false positive: Uninitialized variable)
2009-12-30 08:24:27 +01:00
Daniel Marjamäki
2a28ca72cc
Fixed #1166 (improve check: using uninitialized pointer to create reference 'int &r(*p);')
2009-12-29 20:36:20 +01:00
Daniel Marjamäki
71b328d703
Robert Reif: Fixed #1163 (post increment test broken for complex template types)
2009-12-29 19:24:48 +01:00
Daniel Marjamäki
160f795710
Fixed #1165 (Tokenizer: wrong simplification of 'do { .. } while (0)' if the body contains continue or break)
2009-12-29 12:15:39 +01:00
Daniel Marjamäki
4cbae159b2
ExecutionPath: Refactoring. Removed the bailOut variable
2009-12-29 09:30:02 +01:00
Daniel Marjamäki
cfdf2b8cfe
Fixed #1160 (Null pointer dereference vs. goto)
2009-12-29 09:17:07 +01:00
Daniel Marjamäki
58e85d55e3
astyle formatting
2009-12-29 07:50:33 +01:00
Daniel Marjamäki
905533552d
Robert Reif: Fixed #1164 (only first void operator = found)
2009-12-29 07:48:37 +01:00
Daniel Marjamäki
84ce6ba75a
Robert Reif: Fixed #1162 (add support to tokenize typedefs with templates)
2009-12-29 07:28:00 +01:00
Daniel Marjamäki
d3d3ad101f
Valgrind: Fixed memory leaks when running testrunner that was found by Valgrind
2009-12-28 19:48:30 +01:00
Daniel Marjamäki
61e61c1584
Robert Reif: Fixed #1158 ((possible style) message with regular check)
2009-12-28 18:06:26 +01:00
Daniel Marjamäki
28f2bf2150
Robert Reif: Fixed #1161 (add tokenize support for typedefs with enum definitions)
2009-12-28 17:57:52 +01:00
Daniel Marjamäki
6a31fe6403
Fixed #1159 (Valgrind gives error in Tokenizer::simplifyWhile0)
2009-12-28 16:32:34 +01:00
Daniel Marjamäki
9aca2e7680
Fixed #1156 ([False positive] Uninitialized variable - class member in constructor)
2009-12-28 12:51:28 +01:00
Daniel Marjamäki
6fd74dce47
exitcode suppressions. Partly fixes #1113
2009-12-28 11:26:52 +01:00
Daniel Marjamäki
197bcf17ba
Tokenizer: Simplify 'while (0)' better
2009-12-28 08:37:34 +01:00
Daniel Marjamäki
b1e963fe2c
Fixed another issue with #1154 (false positive: Data is allocated but not initialized)
2009-12-27 18:00:43 +01:00
Daniel Marjamäki
24c5f4d53c
astyle formatting
2009-12-27 17:46:24 +01:00
Daniel Marjamäki
1c0f3ee179
Fixed #1154 (false positive: Data is allocated but not initialized)
2009-12-27 17:35:18 +01:00
Daniel Marjamäki
738987a686
Fixed #1138 (improve check: dereferencing uninitialized pointer)
2009-12-27 17:20:34 +01:00
Martin Ettl
c3886a5803
added further testcases to testmathlib::convert(); now the conversion of +-[hexnumber|octalnumber] works correctly
2009-12-27 15:18:18 +01:00
Martin Ettl
c2b3cfccc9
extended testcases of mathlib; fixed zero conversion: +0 and -0 is converted to 0
2009-12-27 14:30:23 +01:00
Daniel Marjamäki
c7cede1d76
Fixed #972 (New check: return pointer of stack memory)
2009-12-27 13:08:41 +01:00
Daniel Marjamäki
dccba65502
Uninitialized variables: Refactoring and commenting a little
2009-12-27 10:48:44 +01:00
Daniel Marjamäki
fbfe5a4bd1
Fixed #1153 (False positive: uninitialized data for reinterpret_cast)
2009-12-27 09:27:05 +01:00
Daniel Marjamäki
ab7ffd2391
Uninitialized variables: Fixed false positive for 'if (ptr)'
2009-12-26 16:22:14 +01:00
Daniel Marjamäki
a82a085d10
Fixed #1151 (false positive: Data is allocated but not initialized)
2009-12-26 09:30:02 +01:00
Daniel Marjamäki
ad8184f060
Fixed #1152 (Hang/Slow: ExecutionPath handling hangs)
2009-12-26 08:37:59 +01:00
Daniel Marjamäki
9819b75e17
ExecutionPath: Refactoring if-handling
2009-12-25 20:50:23 +01:00
Daniel Marjamäki
7bf0622ae0
ExecutionPath: Refactoring the interface
2009-12-25 20:12:06 +01:00
Daniel Marjamäki
b5291825ce
Fixed #683 (wrong usage of strcmp)
2009-12-25 19:45:21 +01:00
Daniel Marjamäki
5925b88b38
Robert Reif: improve check: array index out of bounds, show name of array, array size and array index
2009-12-25 15:25:58 +01:00
Daniel Marjamäki
1a25e40180
Robert Reif: fix cppcheck post increment warning
2009-12-25 15:19:36 +01:00
Daniel Marjamäki
44a629ec74
Fixed #1141 (Tokenizer: Wrong simplification of calculations)
2009-12-25 14:47:15 +01:00
Daniel Marjamäki
9b05850e97
fixed unit testing
2009-12-23 20:00:12 +01:00
Daniel Marjamäki
ea51c3e098
Refactoring the uninitialized variable / null pointer checks so they use a common function to inspect function calls
2009-12-23 19:51:32 +01:00
Daniel Marjamäki
a7d48f2eb4
Fixed #1147 (Improve check: return uninitialized variable)
2009-12-23 17:55:03 +01:00
Daniel Marjamäki
b6c320de8a
Fixed false positives about uninitialized variables
2009-12-23 15:01:23 +01:00
Daniel Marjamäki
ef21ba7425
Fixed #1137 (false positive: uninitialized variable when using a class object)
2009-12-23 13:57:01 +01:00
Daniel Marjamäki
5a89cc3259
Robert Reif: Fixed #1139 (false negative: CheckOther::postIncrement() only finds at most one problem)
2009-12-23 13:38:54 +01:00
Daniel Marjamäki
4419f4a342
Robert Reif: fix a style warning
2009-12-23 12:16:02 +01:00
Daniel Marjamäki
d2dc5806cd
Borland C++: Fixed compiler error
2009-12-22 23:21:52 +01:00
Daniel Marjamäki
305ef25208
Visual Studio: Added casts to silence compiler warnings
2009-12-22 22:44:21 +01:00
Daniel Marjamäki
cd2e501794
Visual Studio: Fixed unittests
2009-12-22 21:56:00 +01:00
Daniel Marjamäki
2bd60ab6c8
Fixed #1133 (Uninitialized array: strchr, strrchr, etc)
2009-12-22 21:08:29 +01:00
Daniel Marjamäki
566cfce8da
Fixed #1128 (false positive: Data is allocated but not initialized)
2009-12-22 21:00:52 +01:00
Daniel Marjamäki
c05aebbc0a
Fixed #1112 (cppcheck fails because of accented characters in comments)
2009-12-22 20:38:12 +01:00
Daniel Marjamäki
4dac46b2d7
Fixed #1127 (Segfault with template)
2009-12-22 20:10:08 +01:00
Daniel Marjamäki
11da89784f
Eric Sesterhenn: Fixed #1130 (False positive uninitialized variable)
2009-12-22 19:16:34 +01:00
Daniel Marjamäki
b4b63789fc
Eric Sesterhenn: Fixed #1131 (descriptor leak false positive)
2009-12-22 19:13:46 +01:00
Daniel Marjamäki
5b87a51aa5
Robert Reif: Fixed #1108 (Only trivial typedefs are tokenized properly)
2009-12-22 19:10:33 +01:00
Daniel Marjamäki
2e0566bf7a
Fixed #1096 (Non-obvious error message: Overlapping data buffer)
2009-12-21 21:05:55 +01:00
Daniel Marjamäki
72bf1c1dbe
Fixed #1095 (Non-obvious error message: Dangerous usage of erase)
2009-12-21 20:49:16 +01:00
Daniel Marjamäki
f5f8d857c1
preprocessor: removed unnecessary casts
2009-12-21 20:26:57 +01:00
Daniel Marjamäki
83d5a72659
Fixed #1126 (False positive: upon exception there is memory leak (calling unknown function))
2009-12-21 20:04:55 +01:00
Daniel Marjamäki
b3b07321ca
ericsesterhenn: Fixed #1091 (improve check: nullpointer dereference not detected)
2009-12-21 19:09:13 +01:00
Daniel Marjamäki
763e3d9eb5
Execution Path: Refactoring
2009-12-21 18:17:35 +01:00
Reijo Tomperi
df0d2ca83c
Fix #1124 (Invalid number of character ((). Can't process file.)
...
http://sourceforge.net/apps/trac/cppcheck/ticket/1124
2009-12-20 23:50:57 +02:00
Daniel Marjamäki
11c7b8a839
Execution Path: some refactorings of the checking
2009-12-20 19:44:32 +01:00
Daniel Marjamäki
d9cf70c1c6
Fixed #1119 (false positve: uninitialized variable y when y is assigned in inner expression 'x = (y = 10)')
2009-12-20 13:55:17 +01:00
Daniel Marjamäki
191a913ff9
Fixed #1117 (segmentation fault of cppcheck)
2009-12-20 12:45:34 +01:00
Kimmo Varis
9e2a42ebf9
CMake - use more strict compiler flags.
2009-12-20 10:45:57 +02:00
Daniel Marjamäki
d86234b7fd
Preprocessor: Use 'unsigned char' instead of 'char'
2009-12-20 09:35:51 +01:00
Daniel Marjamäki
74b9bccd07
code cleanup
2009-12-20 09:02:25 +01:00
Daniel Marjamäki
813c674611
stl size: minor fix to prevent segmentation fault when token is null
2009-12-19 19:27:12 +01:00
Daniel Marjamäki
ad225ea745
stl size: added documentation
2009-12-19 19:24:48 +01:00
Daniel Marjamäki
e7c0e4d482
Fixed #1093 (False positive: missing constructor)
2009-12-19 17:58:52 +01:00
Daniel Marjamäki
8a1940e043
astyle
2009-12-19 17:57:58 +01:00
Daniel Marjamäki
95f652a2b4
robert reif: Fixed #1118 (new check: use empty() instead of checking size() against zero)
2009-12-19 15:24:59 +01:00
Daniel Marjamäki
69a98d81fc
Fixed #1107 (False positive: Dangerous usage of erase, when using std::list)
2009-12-18 20:55:51 +01:00
Daniel Marjamäki
8665b36f54
lanurmi: Fixed #1016 (Patch: Refactor #ifdefs in filelister.cpp)
2009-12-18 18:52:09 +01:00
Daniel Marjamäki
d4adab3e78
added error info about the strncpy check
2009-12-18 17:33:33 +01:00
Daniel Marjamäki
0da0b5ffed
ericsesterhenn: Fixed #1106 (check if buffer is zero terminated after a strncpy)
2009-12-18 17:26:15 +01:00
Kimmo Varis
b619538aa3
CMake - add missing file in lib.
2009-12-17 20:19:55 +02:00
Kimmo Varis
a669ef0ed4
CMake - reorder files in lib's makefile.
2009-12-17 20:16:28 +02:00
Kimmo Varis
c85c0fbabc
Add simple CMake build files to build lib and cli.
...
Apparently not everybody wants to use QMake to build cppcheck. Which is
understandable if you only want to hack on/build lib and cli. Qt and QMake are
pretty lot to install for just that.
So lets start using CMake. It is widely used and is "just" build system and not
programming framework. CMake is also easy to use for building Qt software too
so it can replace QMake.
This first commit only builds lib and cli for Linux.
2009-12-15 22:27:17 +02:00
Daniel Marjamäki
1680d1fb42
Fixed #1086 (segmentation fault of cppcheck '#if define(A)+define(B)+define(C)!=1')
2009-12-15 20:18:32 +01:00
Daniel Marjamäki
e03ff727d4
Fixed #1103 (false positive: uninitialized variable when using references)
2009-12-15 19:50:48 +01:00
Daniel Marjamäki
368df4c083
TestLocalLeaks: going out of scope
2009-12-15 19:27:07 +01:00
Reijo Tomperi
64261e6909
Fix compiler error: cast from 'CheckLocalLeaks*' to 'int' loses precision
2009-12-15 00:57:32 +02:00
Daniel Marjamäki
9cb6102983
fixed #1099 (GUI: unable to build gui from current git-head)
2009-12-14 23:22:27 +01:00
Reijo Tomperi
30f789a168
Fix #1076 (Invalid number of character ({). Can't process file.)
...
http://sourceforge.net/apps/trac/cppcheck/ticket/1076
2009-12-15 00:06:05 +02:00
Daniel Marjamäki
0c13f9ba5c
Added TestLocalLeaks
2009-12-14 20:30:31 +01:00
Daniel Marjamäki
4dc8794c69
Fixed #1082 (False positive: Resource leak in loop which exits only after releasing resource)
2009-12-13 19:50:49 +01:00
Daniel Marjamäki
829a4f8453
Fixed #1084 (define configuration lost)
2009-12-13 17:18:27 +01:00
Daniel Marjamäki
b4a454fc47
Fixed #1058 (Preprocessor: extracting configuration for '#if DEF == 1')
2009-12-13 15:23:44 +01:00
Daniel Marjamäki
01cfa3b6bd
Fixed #1072 (False positive: class member initialization with '*p=0;')
2009-12-13 09:36:59 +01:00
Daniel Marjamäki
bc808710a0
Fixed #1097 (Internal error: When macro is not expanded 'ABC(for (i=0;i<10;i++) ..);')
2009-12-12 19:58:19 +01:00
Daniel Marjamäki
1002457b17
Fixed #1074 (Exception safety: auto deallocated classes don't leak)
2009-12-12 18:56:26 +01:00
Daniel Marjamäki
c6f913ac3e
Preprocessor: Fixed TODO_ASSERT_EQUALS
2009-12-11 22:32:44 +01:00
Daniel Marjamäki
4d185f0935
Fixed #1080 (false positive: member variable not initialized)
2009-12-11 21:34:04 +01:00
Daniel Marjamäki
9646f62ec1
Fixed #1075 (False positive: uninitialized variable 'return bar(s);')
2009-12-11 19:58:29 +01:00
Daniel Marjamäki
e52fb36c5c
Fixed #1060 (Preprocessor: wrong define handling)
2009-12-11 19:28:37 +01:00
Daniel Marjamäki
91114c50d2
Fixed #1061 (false positve: uninitialized variable)
2009-12-09 20:05:06 +01:00
Daniel Marjamäki
e2473314b5
Fixed #1024 (Preprocessor: doesn't expand macro in macro)
2009-12-09 19:14:07 +01:00
Daniel Marjamäki
418d93eafb
Preprocessor: Refactoring the Preprocessor::expandMacros
2009-12-09 17:13:48 +01:00
Reijo Tomperi
87325799c5
Fix #1071 ((style) The function 'throw' is never used)
...
http://sourceforge.net/apps/trac/cppcheck/ticket/1071
2009-12-08 23:41:47 +02:00
Reijo Tomperi
d08d1deab1
Apply patch from #1066 (Speed up cppcheck)
...
http://sourceforge.net/apps/trac/cppcheck/ticket/1066
2009-12-08 23:12:49 +02:00
Reijo Tomperi
db30c5b0d2
Fix #1069 (Minor spelling mistake across cppcheck)
...
http://sourceforge.net/apps/trac/cppcheck/ticket/1069
2009-12-08 20:10:08 +02:00
Reijo Tomperi
bd024b7a2d
Fix #1065 (Internal error - incrementing single char in char array)
...
http://sourceforge.net/apps/trac/cppcheck/ticket/1065
2009-12-07 23:42:30 +02:00
Daniel Marjamäki
e5c507dc02
Fixed #1063 (False positive: deallocated memory doesn't leak upon exception)
2009-12-07 19:23:33 +01:00
Reijo Tomperi
f5849f9be2
Fix #1057 (Tokenizer: negative numbers are not tokenized correctly in switch-case)
...
http://sourceforge.net/apps/trac/cppcheck/ticket/1057
2009-12-07 00:09:56 +02:00
Reijo Tomperi
e57d9609a7
small fix to previous commit
2009-12-06 22:32:38 +02:00
Reijo Tomperi
fc40808a8a
Minor refactoring for checkother.cpp
2009-12-06 22:28:38 +02:00
Daniel Marjamäki
8db35189e0
STL: fix iterator bug
2009-12-06 21:21:27 +01:00
Daniel Marjamäki
3100bb3ccc
Visual C++: Suppress compiler warnings
2009-12-06 20:34:02 +01:00
Daniel Marjamäki
3c063bfdb8
Preprocessor: Reverted refactoring
2009-12-06 20:10:10 +01:00
Daniel Marjamäki
046db9b2bb
Preprocessor: Fix so the unit tests work again
2009-12-06 19:53:17 +01:00
Daniel Marjamäki
bbc63b6b5b
twistedwave: Fixed #1055 (Support for inline suppressions)
2009-12-06 19:38:53 +01:00
Daniel Marjamäki
46b19e0184
Preprocessor: Refactoring to make it simpler
2009-12-06 19:17:59 +01:00
Daniel Marjamäki
2d180ab918
newcheck: added the 'newcheck' functionality. It's still in early state so it needs refactoring
2009-12-06 18:41:28 +01:00
Daniel Marjamäki
c2a37c5d69
class checking: It's a 'possible style' error if a private constructor is not initializing a member variable
2009-12-06 18:35:32 +01:00
Daniel Marjamäki
d94bc4c89f
version 1.39
2009-12-06 13:34:51 +01:00
Daniel Marjamäki
a30a64d280
suppress 'internal error' message about failed template instantiation in release mode
2009-12-06 11:44:53 +01:00
Daniel Marjamäki
cd4e355f17
Fixed #1052 (Internal error for 'int vals[] = { 0x13, 1?0x01:0x00 };')
2009-12-06 10:58:27 +01:00
Daniel Marjamäki
a5e43b4be5
Fixed #1051 (segmentation fault when there is syntax error)
2009-12-06 09:02:13 +01:00
Daniel Marjamäki
75f6e20e61
Fixed #1050 (Internal error: In tokenizer for: 'do { sizeof 1; } while (0);')
2009-12-06 08:46:59 +01:00
Daniel Marjamäki
e66156ab5c
Fixed #1049 (Tokenizer: internal error for 'std::list<std::string[8]> w1, w2;')
2009-12-05 22:19:54 +01:00
Daniel Marjamäki
da4d03f6c4
Fixed #1048 (False positive: exceptNew error with nothrow)
2009-12-05 22:05:59 +01:00
Daniel Marjamäki
e9b342c56b
Fixed #1046 (tokenizer: internal error for 'discard_block< (1 << 24), 10, 24 > u, v;')
2009-12-05 21:15:14 +01:00
Daniel Marjamäki
42093911d6
updated help about --enable
2009-12-05 20:08:52 +01:00
Daniel Marjamäki
aed06fbd86
Borland C++: fixed compiler error and updated the project file to include iterator debugging
2009-12-05 19:28:20 +01:00
Daniel Marjamäki
642469b93f
Fixed #1044 (Access violation with --enable=all)
2009-12-05 17:37:30 +01:00
Daniel Marjamäki
0b09c36851
Fixed #1026 (false positive: buffer access out of bounds)
2009-12-05 11:41:30 +01:00
Daniel Marjamäki
7f15fea735
Fixed #1043 (use cppcheck:.. syntax in error messages)
2009-12-05 08:08:28 +01:00
Daniel Marjamäki
052ce15176
--enable: readded code so that parameters can be comma separated
2009-12-04 21:31:14 +01:00
Daniel Marjamäki
737844d652
fix a bug in commit 84a6fe6b54
2009-12-04 20:12:34 +01:00
Daniel Marjamäki
84a6fe6b54
Fixed #1034 (change --enable to --enable=all)
2009-12-04 19:35:58 +01:00
Reijo Tomperi
54629ff221
Fix #1037 (tokenizing a nested do while, while loop fails)
...
http://sourceforge.net/apps/trac/cppcheck/ticket/1037
2009-12-04 00:06:03 +02:00
Reijo Tomperi
2b980f9abe
astyle fix
2009-12-03 22:48:52 +02:00
Daniel Marjamäki
48bb1fdc83
Eric Sesterhenn: Fixed #1032 (False positive resource leak with exit at end of function)
2009-12-03 19:19:20 +01:00
Daniel Marjamäki
96268b4caf
Fixed #1030 (wrong line number with goto)
2009-12-02 19:47:35 +01:00
Reijo Tomperi
f5c81429cb
Refactoring: Parse --enable values in Settings class
2009-11-30 23:48:58 +02:00
Reijo Tomperi
79c8f3dc16
Add --unused-functions back to help, but mention that it is deprecated.
2009-11-30 22:45:05 +02:00
Daniel Marjamäki
153a13272c
ericsesterhenn: Fix #1028 (False positive resource leak)
2009-11-30 16:45:19 +01:00
Daniel Marjamäki
ded2e68c2e
Fix #1022 (False positive: uninitialized variable when using local struct)
2009-11-29 19:23:31 +01:00
Reijo Tomperi
f1ae932f18
Fix #986 (Move --all and --style to --enable)
...
http://sourceforge.net/apps/trac/cppcheck/ticket/986
2009-11-29 18:59:12 +02:00
Daniel Marjamäki
e6b5fe99f6
Fixed #1027 (Internal error: sizeof a++)
2009-11-29 17:25:35 +01:00
Daniel Marjamäki
f4943b8b9c
changed error message when there an internal error in Cppcheck is found
2009-11-29 16:13:14 +01:00
Daniel Marjamäki
e7d7507c65
Fixed #1020 (lib/tokenize.cpp:4615: bool Tokenizer::validate() const: Assertion 0 failed)
2009-11-29 12:14:42 +01:00
Reijo Tomperi
57aac9270a
validator bugs are now printed using the errorlogger
2009-11-28 23:08:43 +02:00
Daniel Marjamäki
f927375b7e
DJGPP: fix runtime errors because list is destroyed before objects
2009-11-28 19:43:13 +01:00
Reijo Tomperi
ee7b09fb8d
Use sizeOfType() instead of sizeof(void*)
2009-11-28 18:24:16 +02:00
Martin Ettl
03e7914c98
partial fix of ticket #997 ; added check for write() two testcases
2009-11-28 13:41:24 +01:00
Daniel Marjamäki
b0470d649a
mode change from 755 to 644
2009-11-28 12:56:34 +01:00
Daniel Marjamäki
f75c9619d1
Fixed #1021 (Out-of-bounds access false positive)
2009-11-28 12:51:23 +01:00
Daniel Marjamäki
6e175053c1
minor fixes
2009-11-28 11:47:44 +01:00
Daniel Marjamäki
3db49aee71
fixed buffer overrun and removed redundant function Token::str
2009-11-28 09:48:43 +01:00
Daniel Marjamäki
5ab8967632
Borland C++: Fixed compiler error
2009-11-28 08:55:51 +01:00
Reijo Tomperi
0bdf63d864
Token debug function printOut() can now print out filename instead of index
2009-11-28 00:04:04 +02:00
Reijo Tomperi
2c51542cf1
Fix #1018 (strcat(strcat()) causes assertion in Tokenizer::validate)
...
Test case provided by povaddict
http://sourceforge.net/apps/trac/cppcheck/ticket/1018
2009-11-27 23:21:13 +02:00
Daniel Marjamäki
c94ecfe1a3
Fixed #1015 (SIGABRT: Tokenizer::validate for openttd/src/ai/ai_config.cpp)
2009-11-27 17:32:53 +01:00
Daniel Marjamäki
7616246597
Fixed #1014 (Preprocessor: Invalid preprocessing of '#define some_delete(x) delete x;')
2009-11-26 17:32:18 +01:00
Reijo Tomperi
12a87fa3a4
Fix #1007 (False positive array index out of bounds concerning a switch statement in a for loop)
...
Bailout if switch is found in for loop.
http://sourceforge.net/apps/trac/cppcheck/ticket/1007
2009-11-25 22:40:51 +02:00
Daniel Marjamäki
128b2b8c59
Fixed #989 (CppCheck crashes on Win XP when scanning large directories/subdirectories)
2009-11-23 18:59:50 +01:00
Reijo Tomperi
2ff6ac9768
Fix #1003 (Compiler warning: is there a reason for Tokenizer::getErrorMessages to be virtual?)
...
Destructor is now virtual.
http://sourceforge.net/apps/trac/cppcheck/ticket/1003
2009-11-22 16:06:33 +02:00
Daniel Marjamäki
9b397afeca
Temporary fix for #994 (cppcheck cannot check my sources with segfaulting)
2009-11-22 13:38:45 +01:00
Daniel Marjamäki
7f6f41fd53
Fixed #993 (Latest Git drop aborts at 63% of wine tree)
2009-11-22 09:06:39 +01:00
Slava Semushin
334eaa35ef
lib/preprocessor.cpp: clean up code.
...
Improvements for: 092f64b77a
No functional change.
2009-11-22 01:14:29 +06:00
Daniel Marjamäki
092f64b77a
Fixed #982 (Preprocessor: detects and remove conditions which always true)
2009-11-21 19:53:07 +01:00
Slava Semushin
38a6c41730
Fixed #988 (Tokenizer::simplifyDoWhileAddBraces(): don't add braces after "do" when it not a loop)
...
FIXME: test cases needed.
http://sourceforge.net/apps/trac/cppcheck/ticket/988
2009-11-21 20:46:17 +06:00
Reijo Tomperi
9bdf4502ed
Fix #995 (false positive: buffer access out of bounds when using fgets)
...
http://sourceforge.net/apps/trac/cppcheck/ticket/995
2009-11-21 15:45:52 +02:00
Reijo Tomperi
6417704577
Fix #985 (Detect buffer overrun with read())
...
http://sourceforge.net/apps/trac/cppcheck/ticket/985
2009-11-20 23:47:06 +02:00
Daniel Marjamäki
531d0fa685
Fixed #965 (Division by zero false positive with nested macros)
2009-11-20 20:42:28 +01:00
Slava Semushin
41b2a52915
Fixed #990 (Tokenizer::simplifyIfAddBraces() handle case where statement after if doesn't end by semicolon)
...
http://sourceforge.net/apps/trac/cppcheck/ticket/990
2009-11-21 01:40:46 +06:00
Daniel Marjamäki
91f7c15c24
Fixed #960 (Tokenizer::validate() assertion failure with mismatched brackets)
2009-11-20 20:10:42 +01:00
Daniel Marjamäki
7890589693
Fixed #912 (### Unlogged error at Tokenizer::syntaxError: Invalid number of character (())
2009-11-20 19:18:57 +01:00
Slava Semushin
5369965e55
Fixed #983 (Tokenizer::simplifyTypedef() incorrectly substitute type inside namespace)
...
http://sourceforge.net/apps/trac/cppcheck/ticket/983
2009-11-20 00:02:16 +06:00
Reijo Tomperi
7ddc4f4e02
Fix #971 (Preprocessor: Handle partial macro in macro)
...
http://sourceforge.net/apps/trac/cppcheck/ticket/971
2009-11-19 00:34:00 +02:00
Daniel Marjamäki
42ffea4f16
Fixed #968 (False positive when TEMP_FAILURE_RETRY used)
2009-11-18 17:17:37 +01:00
Slava Semushin
42c5025000
Fixed #970 (Tokenizer: Incorrect comparison order simplification)
...
Revert changes from 11cb7b4710
commit
for lib/tokenize.cpp (fixed it by another way).
Teach unsignedint() to expand "unsigned" in casts.
http://sourceforge.net/apps/trac/cppcheck/ticket/970
2009-11-18 00:05:18 +06:00
Daniel Marjamäki
d866c174cf
Fixed
2009-11-15 20:26:07 +01:00
Daniel Marjamäki
469a8e4032
Fixed #925 (uninitialized deletion not detected)
2009-11-15 20:01:57 +01:00
Daniel Marjamäki
95c898f37b
Fixed #891 (false positive: division by zero)
2009-11-15 19:07:36 +01:00
Reijo Tomperi
54c6d8ab2c
Minor fix to previous commit
2009-11-15 17:49:47 +02:00
Reijo Tomperi
9275b49688
Fix #964 (Integer division by zero exception)
...
http://sourceforge.net/apps/trac/cppcheck/ticket/964
2009-11-15 17:44:30 +02:00
Daniel Marjamäki
caa9707e33
help screen updates for the --enable command ( #883 )
2009-11-15 15:36:57 +01:00
Daniel Marjamäki
2b1b7f78f5
Fixed #883 (Add new command line argument --enable)
2009-11-15 15:24:33 +01:00
Slava Semushin
6669a50634
Fixed #842 (out of bounds: when buffer is allocated with malloc)
...
http://sourceforge.net/apps/trac/cppcheck/ticket/842
2009-11-15 18:38:57 +06:00
Slava Semushin
3911dd79cb
Fixed #900 (Improve out-of-bounds check to detect error with "new char(x)")
...
http://sourceforge.net/apps/trac/cppcheck/ticket/900
2009-11-15 18:04:17 +06:00
Daniel Marjamäki
822f64ec9a
Fixed #953 (false positive: 'uninitialized variable' with function pointer)
2009-11-15 12:42:04 +01:00
Daniel Marjamäki
b5cbc509f3
Fixed #483 (False positive: found leak when foreach for lists used)
2009-11-15 10:30:00 +01:00
Daniel Marjamäki
14fd0154d2
memory leaks: simple code cleanup
2009-11-15 09:53:38 +01:00
Daniel Marjamäki
5dd7b054f9
Fixed #915 (false positive: memory leak for struct member (allocated in condition)
2009-11-15 09:28:08 +01:00
Daniel Marjamäki
ebf907cbc0
Fixed #936 (false positive: uninitialized variable '.. else return; .. ')
2009-11-14 20:37:54 +01:00
Daniel Marjamäki
99c6d11c70
removed command line flag --exception-safety from the help page
2009-11-14 14:02:54 +01:00
Slava Semushin
11cb7b4710
Fixed #961 (Tokenizer: call simplifyCasts() before removing "unsigned" keyword)
...
http://sourceforge.net/apps/trac/cppcheck/ticket/961
2009-11-14 17:01:59 +06:00
Daniel Marjamäki
fee96f3cd6
Fixed #944 (new false positives against Wine Git Tree)
2009-11-14 09:06:28 +01:00
Daniel Marjamäki
ec6d66ff45
Fixed #913 (false positive: uninitialized variable)
2009-11-14 08:00:17 +01:00
Daniel Marjamäki
a36c410d45
Preprocessor: When #error is encountered the result is an empty string => don't check configuration
2009-11-13 22:12:29 +01:00
Daniel Marjamäki
1187587521
Fixed #919 (possible memory leak not detected)
2009-11-13 20:22:28 +01:00
Slava Semushin
2ec5438186
Fixed #954 (Tokenizer: correctly simplify sizeof of class members)
...
http://sourceforge.net/apps/trac/cppcheck/ticket/954
2009-11-14 01:07:44 +06:00
Reijo Tomperi
c4244ac9e8
Fix #945 (Array index out of bounds not detected, because of "int const")
...
http://sourceforge.net/apps/trac/cppcheck/ticket/945
2009-11-12 23:49:39 +02:00
Reijo Tomperi
3d5760b149
Fix #947 (Errors not detected when size_t is used instead of int)
...
http://sourceforge.net/apps/trac/cppcheck/ticket/947
2009-11-12 23:31:13 +02:00
Reijo Tomperi
0518eed937
Fix #946 (False positive: Buffer access out-of-bounds)
...
http://sourceforge.net/apps/trac/cppcheck/ticket/946
2009-11-12 23:24:44 +02:00
Daniel Marjamäki
b2cec721c0
Fixed #951 (Preincremented struct member confused with numeric constant)
2009-11-12 22:16:24 +01:00
Slava Semushin
b6cda12251
Fixed #903 (segmentation fault of cppcheck)
...
http://sourceforge.net/apps/trac/cppcheck/ticket/903
2009-11-13 00:41:35 +06:00
Daniel Marjamäki
c337b4eb33
Fixed #950 (Bug in cppcheck tokenize.cpp)
2009-11-12 18:53:26 +01:00
Slava Semushin
2fef287869
Fixed #935 (Tokenizer: link() problem)
...
http://sourceforge.net/apps/trac/cppcheck/ticket/935
2009-11-12 00:16:05 +06:00
Reijo Tomperi
4372b3aa92
Use validate after tokenize and simplifyTokenlist calls. Disabled until known problems fixed.
2009-11-10 23:10:56 +02:00
Daniel Marjamäki
39614a699e
Uninitialized variables: detect uninitialized pointer array
2009-11-10 19:35:54 +01:00
Daniel Marjamäki
c301dc1907
Fixed #928 (false positive: member variable not initialized in constructor)
2009-11-10 19:30:37 +01:00
Daniel Marjamäki
b470ea06b8
Fixed #931 (Invalid interator false positive with identical variable names)
2009-11-10 19:07:04 +01:00
Daniel Marjamäki
e0b1303b50
Fixed #929 (Uninitialized variable false positive)
2009-11-10 18:05:55 +01:00
Daniel Marjamäki
51f983629b
Fixed #932 (false positive: Dereferenced iterator 'i' has been erased)
2009-11-10 17:20:20 +01:00
Reijo Tomperi
a5ce4fd3c3
Made some syntax errors slightly easier to detect.
2009-11-09 01:11:52 +02:00
Daniel Marjamäki
41e59d8348
Fixed #832 (Exception Safety: deallocating member pointer and then throwing exception)
2009-11-08 09:54:08 +01:00
Daniel Marjamäki
4b04ed9ad9
Fixed #910 (false positive: uninitialized variable for array)
2009-11-08 07:31:01 +01:00
Daniel Marjamäki
d88c236efe
uninitialized data: minor fix to handle 'new char [' better
2009-11-07 14:54:12 +01:00
Reijo Tomperi
45406f5367
astyle fix
2009-11-07 14:19:25 +02:00
Daniel Marjamäki
60caefe069
uninitialized data: added more checking for allocated data
2009-11-07 09:10:15 +01:00
Daniel Marjamäki
0c8d327809
Fixed #907 (Tokenizer: known result of strlen)
2009-11-07 08:25:39 +01:00
Daniel Marjamäki
2a6cde4369
Fixed #905 (memory leak not detected when using puts)
2009-11-07 07:21:39 +01:00
Reijo Tomperi
b222ef89be
Fix #903 (false positive: buffer access out of bounds)
...
http://sourceforge.net/apps/trac/cppcheck/ticket/903
2009-11-07 00:58:33 +02:00
Daniel Marjamäki
c561a36cc7
uninitialized variables: better checking of strncpy
2009-11-06 19:06:45 +01:00
Daniel Marjamäki
d70bc2359a
removed --exception-safety and added --enable
2009-11-06 17:04:10 +01:00
Daniel Marjamäki
7397bfc765
Fixed #904 (false positive: uninitialized variable)
2009-11-06 16:50:02 +01:00
Daniel Marjamäki
53f7b12b4f
Fixed #902 (false positive: uninitialized variable when variable is initialized in macro)
2009-11-06 16:02:13 +01:00
Daniel Marjamäki
58c54d2ed4
Fixed #898 (Tokenizer: remove unneeded const after *)
2009-11-05 21:30:05 +01:00
Daniel Marjamäki
442584151b
Fixed #897 (false positive: uninitialized variable when assigning pointer to array to struct member)
2009-11-05 21:07:04 +01:00
Reijo Tomperi
de4ca924b5
Fixed #896 (False positive with --all when return value of open() is positive in a loop)
...
http://sourceforge.net/apps/trac/cppcheck/ticket/896
2009-11-05 00:58:15 +02:00
Daniel Marjamäki
141b91ae08
updated error message when memory leaks upon exception
2009-11-04 20:45:26 +01:00
Reijo Tomperi
80c66f8ebc
Fix #895 (false positive: Suspicious pointer subtraction)
...
http://sourceforge.net/apps/trac/cppcheck/ticket/895
2009-11-04 21:36:27 +02:00
Daniel Marjamäki
3c82fbb73a
use Token::link instead of findmatch to find ']'
2009-11-03 22:48:41 +01:00
Reijo Tomperi
00b62442b6
Fix #894 (Invalid line number in "Invalid number of character")
...
http://sourceforge.net/apps/trac/cppcheck/ticket/894
2009-11-03 22:21:28 +02:00
Daniel Marjamäki
c3dff9a6d3
Fixed #893 (False Positive: Uninitialized variable b in a[0] = b[0] = '\0';)
2009-11-03 21:02:16 +01:00
Daniel Marjamäki
68f63fdd75
Exception safety: added check for unsafe reallocation of member pointer
2009-11-03 20:26:52 +01:00
Daniel Marjamäki
616a760b6c
Exception Safety: detect unsafe multiple new in a execution path ( #831 )
2009-11-03 19:43:51 +01:00
Daniel Marjamäki
797e9aeaf5
Fixed #890 (false positive: Uninitialized variable when pointer takes the address to array)
2009-11-03 17:03:53 +01:00
Reijo Tomperi
7fc72484ec
Fix #881 (Tokenizer: Something seems to be wrong in Tokenizer::simplifyKnownVariables)
...
http://sourceforge.net/apps/trac/cppcheck/ticket/881
2009-11-03 00:07:15 +02:00
Daniel Marjamäki
87800185c4
STL: refactoring and fixing
2009-11-02 21:53:01 +01:00
Daniel Marjamäki
bc3b12db72
astyle formatting
2009-11-02 20:25:08 +01:00
Daniel Marjamäki
df3ffa2eda
STL: added check for dangerous usage of std::find ( #829 )
2009-11-02 20:24:38 +01:00
Daniel Marjamäki
8d57cef7f9
Fixed #764 (usage of unitialized variable not detected)
2009-11-02 19:58:49 +01:00
Daniel Marjamäki
169bcfcff2
Fixed #882 (false positive: uninitialized variable)
2009-11-02 18:31:22 +01:00
Daniel Marjamäki
4abbe9ffd4
Fixed #889 (false positive: uninitialized variable)
2009-11-02 16:28:15 +01:00
Reijo Tomperi
618eed3d59
Fixed segmentation fault.
...
Had to change one test case to TODO for now.
2009-11-01 21:49:43 +02:00
Daniel Marjamäki
319cdc2b43
Fixed #880 (Tokenizer: The Tokenizer::simplifyTemplates doesn't handle recursive templates)
2009-11-01 19:03:52 +01:00
Daniel Marjamäki
fec7acdc27
Templates: Better handling of recursive templates
2009-11-01 15:56:00 +01:00
Reijo Tomperi
eebbc1b906
Fix #884 (False positive: Possible null pointer reference about a non-pointer)
...
http://sourceforge.net/apps/trac/cppcheck/ticket/884
2009-11-01 13:08:37 +02:00
Daniel Marjamäki
543d5cbf45
Fixed #831 (Exception safety: multiple new in a simple execution path)
2009-10-31 18:58:42 +01:00
Daniel Marjamäki
c83d9cd786
Fixed #843 (new check: Passing uninitialized array to strlen/strdup/strcpy/strcat/etc)
2009-10-31 16:36:56 +01:00
Daniel Marjamäki
395ce30d81
Fixed #877 (False positive: After insert, iterator may be invalid)
2009-10-31 15:27:33 +01:00
Reijo Tomperi
344fdc1d7d
Fix #685 (Include file not found is printed with -v when include file is empty)
...
http://sourceforge.net/apps/trac/cppcheck/ticket/685
2009-10-31 13:46:03 +02:00
Daniel Marjamäki
a337708ae5
Fixed #430 (Tokenizer: handle templates with partial specialisation)
2009-10-31 12:34:52 +01:00
Daniel Marjamäki
266291baf4
Fixed #876 (false positive: uninitialized variable)
2009-10-31 10:30:32 +01:00
Daniel Marjamäki
45df223bfb
Fixed #875 (Uninitialized variable: initialization in subfunction)
2009-10-30 18:28:01 +01:00
Daniel Marjamäki
6ac2b6ab14
uninitialized variables: return|goto are not used in variable declarations
2009-10-30 15:23:27 +01:00
Daniel Marjamäki
7dbf22aa3f
null pointer: fixed false positive when condition checks if pointer is ok
2009-10-30 15:14:24 +01:00
Daniel Marjamäki
feb065abc8
Fixed #867 (unused member function warning)
2009-10-30 15:00:13 +01:00
Daniel Marjamäki
2cf849a9b8
uninitialized variables: fixed false positive when switch is used
2009-10-30 14:52:20 +01:00
Daniel Marjamäki
765c824c6f
Uninitialized pointers: It's allowed to dereference uninitialized non-pointer variables
2009-10-30 14:31:37 +01:00
Daniel Marjamäki
44a9c9b458
Fixed #874 (false positive: uninitialized variable)
2009-10-30 14:06:40 +01:00
Daniel Marjamäki
768225bb1b
uninitialized variables: fixed false positives for member variables
2009-10-30 13:43:00 +01:00
Daniel Marjamäki
c6d7fad84f
uninitialized variables: added check
2009-10-29 21:34:43 +01:00
Reijo Tomperi
4a61bd0432
Fix #870 (The CheckClass::getVarList method detects 'const' as a variable name.)
...
http://sourceforge.net/apps/trac/cppcheck/ticket/870
2009-10-29 21:54:51 +02:00
Reijo Tomperi
504ae8e22d
Fix #868 (False positive - buffer access out of bounds in for loop)
...
http://sourceforge.net/apps/trac/cppcheck/ticket/868
2009-10-29 16:04:23 +02:00
Reijo Tomperi
38e1a0e03d
Minor fix to previous commit
2009-10-28 22:49:46 +02:00
Reijo Tomperi
9db22d9b48
Modify CheckBufferOverrun::checkGlobalAndLocalVariable() to use varid only.
...
Also add some TODO test cases.
2009-10-28 22:42:54 +02:00
Daniel Marjamäki
cba94feded
Restructuring: Updated the Visual Studio project files. They are now generated by qmake
2009-10-28 17:37:38 +01:00
Daniel Marjamäki
0682db47a7
Memory leaks: Detect simple leak
2009-10-27 23:08:11 +01:00
Daniel Marjamäki
8e3123ec1c
Fixed #854 (invalid XML generated for folders containing &)
2009-10-27 22:10:14 +01:00
Daniel Marjamäki
45b0758e71
Fixed #860 (Improve double delete detection)
2009-10-27 21:28:03 +01:00
Daniel Marjamäki
f2106f96ad
Restructuring: updated win_installer scripts
2009-10-27 20:22:11 +01:00
Reijo Tomperi
59acfbc4df
Fix #863 (false positive memset array of pointers)
...
http://sourceforge.net/apps/trac/cppcheck/ticket/863
Also fix test cases for 64 bit systems.
2009-10-27 20:23:45 +02:00
Daniel Marjamäki
aab1519ab0
simple optimisation
2009-10-27 17:55:27 +01:00
Reijo Tomperi
3be9f2e6cc
astyle fix
2009-10-27 11:10:59 +02:00
Daniel Marjamäki
599b04afbf
Refactoring: Changed pointer to reference
2009-10-26 21:31:36 +01:00
Daniel Marjamäki
90e44bb3bb
restructuring the folder structure
2009-10-25 21:20:42 +01:00
Reijo Tomperi
1ee28ba444
Refactoring: Make Cppcheck::version() static
...
Update codeblocks projectfile
2009-10-25 22:06:58 +02:00
Daniel Marjamäki
d4f706e040
fixed qmake building with new folder structure
2009-10-25 19:29:10 +01:00
Daniel Marjamäki
09859c1019
refactoring the folder structure
2009-10-25 12:49:06 +01:00