Reijo Tomperi
|
9b9223480d
|
Refactoring: reportErr takes now only one parameter, ErrorLogger::ErrorMessage, which contains all required information and also some help
functions for formatting it for output.
|
2009-02-10 21:51:52 +00:00 |
Daniel Marjamäki
|
71b4e5a912
|
stl: added testcase for bad iterator usage
|
2009-02-10 20:01:39 +00:00 |
Reijo Tomperi
|
4660b7648d
|
Moved stloutofbounds check to CheckStl class.
|
2009-02-10 19:56:00 +00:00 |
Daniel Marjamäki
|
5dd1e84cf3
|
astyle coding style update
|
2009-02-10 19:41:22 +00:00 |
Daniel Marjamäki
|
c1638996f9
|
STL: added check for iterator usage
|
2009-02-10 19:40:21 +00:00 |
Reijo Tomperi
|
5721e4469b
|
stlOutOfBounds error message created
|
2009-02-10 19:36:49 +00:00 |
Reijo Tomperi
|
9dff3f4c52
|
Fix ticket #94 (STL container overrun). Check is currently behind --all
|
2009-02-09 22:25:44 +00:00 |
Reijo Tomperi
|
1373e14bc9
|
Fix ticket #93 (Write xml results into error stream instead of results.xml file.) and also refactor the
code to use ErrorLogger::reportErr() for all errors, for both xml and plain text. And move xml formatting
from Cppcheck to CppcheckExecutor.
|
2009-02-09 20:51:04 +00:00 |
Daniel Marjamäki
|
a5f88862b4
|
memory leak: keep track of --all better
|
2009-02-09 20:16:00 +00:00 |
Daniel Marjamäki
|
574db37a6f
|
uninitialized variables: added testcases and made a fix
|
2009-02-09 07:47:41 +00:00 |
Reijo Tomperi
|
fb3c81dcd9
|
Fix ticket #80 (refactoring: classes ErrorMessage and ErrorLogger), note that errormessage and errorlogger were merged, errormessage.* is no more.
|
2009-02-08 21:20:35 +00:00 |
Daniel Marjamäki
|
1637e867de
|
mismatching allocation size: moved to error suite
|
2009-02-08 18:34:04 +00:00 |
Daniel Marjamäki
|
81ed48562c
|
Memory leak: find memory leak in TestMemleak::unknownFunction2
|
2009-02-08 18:27:09 +00:00 |
Daniel Marjamäki
|
0361c9d338
|
Memory leak: Handling function that can't be traced into
|
2009-02-08 11:59:04 +00:00 |
Reijo Tomperi
|
cb5974e94e
|
Fixed issue about 4+5 being made a single token, problem appeared in recent commits.
|
2009-02-08 10:56:20 +00:00 |
Reijo Tomperi
|
c345fa6186
|
Fix ticket #89 (False positive, (style) Redundant code - begins with numeric constant (e-value))
|
2009-02-08 10:39:55 +00:00 |
Reijo Tomperi
|
da3efe8fa2
|
Improve fix made for Ticket #85 to handle strings that are in 3 parts also.
|
2009-02-08 10:25:33 +00:00 |
Reijo Tomperi
|
4305d749ff
|
Fixed ticket #88 (False positive, (style) Redundant code - begins with numeric constant)
|
2009-02-08 09:51:45 +00:00 |
Reijo Tomperi
|
200a159c67
|
Fix ticket #85 (False positive (style) Redundant code, begins with string)
|
2009-02-08 08:52:03 +00:00 |
Reijo Tomperi
|
811d76eb31
|
Fixed compiler warning ( #81 ) and optimized the speed a little. Removed _cstr from Token class, use _str.c_str() instead.
|
2009-02-07 21:05:45 +00:00 |
Reijo Tomperi
|
d48671bdfb
|
Fixed more of ticket #81 (getting rid of compiler warnings)
|
2009-02-07 20:55:25 +00:00 |
Reijo Tomperi
|
b211b8cbe8
|
Fix ticket #84 (unit testing: use "protected" instead of preprocessor)
|
2009-02-07 20:06:00 +00:00 |
Reijo Tomperi
|
798d86216a
|
Fix ticket #83 (cppcheck hangs) and add a test case for it
|
2009-02-07 19:15:10 +00:00 |
Daniel Marjamäki
|
e71c6aaa9f
|
Borland C++: Fix to make it compile
|
2009-02-07 18:35:55 +00:00 |
Reijo Tomperi
|
f14c2d6155
|
Fixed partially ticket #81 (getting rid of compiler warnings)
|
2009-02-07 15:37:01 +00:00 |
Daniel Marjamäki
|
3c289e52c5
|
memory allocation: check for mismatching size
|
2009-02-07 10:54:39 +00:00 |
Daniel Marjamäki
|
bb71f9e83e
|
TestMemleak: fixed problems with wrong linenumbers. This fixes ticket 79
|
2009-02-07 09:44:57 +00:00 |
Daniel Marjamäki
|
eb5d11c1c3
|
FileLister: Added code that I received from Jeffrey Walton to handle directories and files better
|
2009-02-07 07:38:22 +00:00 |
Daniel Marjamäki
|
03acc12977
|
mismathing allocation and deallocation: moved to error checks
|
2009-02-06 18:24:01 +00:00 |
Daniel Marjamäki
|
3c7e40fe13
|
errmsg: use the error message dealloc-use
|
2009-02-06 06:22:44 +00:00 |
Daniel Marjamäki
|
7299d3e5b1
|
memleak: removed false positives for mismatching allocation and deallocation
|
2009-02-06 06:11:47 +00:00 |
Reijo Tomperi
|
a06861948b
|
Fixed: Ticket #78 Change (always) into (error) in error messages
|
2009-02-05 21:06:32 +00:00 |
Daniel Marjamäki
|
10abbda6a7
|
memleak: corrected the wrong line number (#77)
|
2009-02-05 20:17:01 +00:00 |
Daniel Marjamäki
|
05e330ed38
|
incomplete statement: minor update
|
2009-02-05 18:57:53 +00:00 |
Daniel Marjamäki
|
7ccb6217bf
|
remove casts: Added test case to ensure that function declarations are not reduced
|
2009-02-04 19:40:48 +00:00 |
Daniel Marjamäki
|
aeb573d529
|
returning pointer to local array
|
2009-02-04 18:49:19 +00:00 |
Daniel Marjamäki
|
bd73d0913f
|
charvar: fixed todo testcase
|
2009-02-04 17:12:53 +00:00 |
Daniel Marjamäki
|
c46c4c50e9
|
memory leak: fixed ticket #9
|
2009-02-04 06:11:36 +00:00 |
Reijo Tomperi
|
142a21973a
|
Fixed varid is 0 bug which happened with sizeof(var[0]) and added testcase for it
|
2009-02-03 21:42:50 +00:00 |
Daniel Marjamäki
|
59f95d311b
|
tokenizer: setvarid handle variable declaration at start of token list
|
2009-02-02 19:19:36 +00:00 |
Daniel Marjamäki
|
0059ceefb9
|
Tokenizer: sizeof handling of 'sizeof(var[0])'
|
2009-02-02 18:59:32 +00:00 |
Daniel Marjamäki
|
d0af67a1b1
|
Tokenizer: setVarId improved to handle declaration at the first token
|
2009-02-02 17:35:46 +00:00 |
Daniel Marjamäki
|
27c0f786bc
|
tokenizer: improved sizeof handling
|
2009-02-02 17:27:34 +00:00 |
Daniel Marjamäki
|
460c29f6a2
|
memory leaks: Minor fix to output correct severity
|
2009-02-02 06:04:48 +00:00 |
Daniel Marjamäki
|
385c28a02e
|
xml: generating better xml output
|
2009-02-01 18:00:47 +00:00 |
Daniel Marjamäki
|
d29d7e60a9
|
errmsg: refactoring the error messages
|
2009-02-01 15:47:36 +00:00 |
Daniel Marjamäki
|
566e1102bc
|
changed version to 1.28
|
2009-02-01 08:17:45 +00:00 |
Reijo Tomperi
|
6b16b7482a
|
Removed some dead code and improved one function to use reference instead of a copy.
|
2009-01-31 21:12:24 +00:00 |
Reijo Tomperi
|
b471ac2e3c
|
Fixing files using dos-style line change to use unix-style line change.
|
2009-01-31 19:29:27 +00:00 |
Reijo Tomperi
|
7da34ed249
|
Running astyle for the previous commits
|
2009-01-31 18:54:34 +00:00 |
Leandro Penz
|
7adcd0c355
|
dangerousfunctions: added check for mktemp (ticket #69), and refatored gets and scanf check from bufferoverrun into dangerousfunctions.
|
2009-01-31 18:24:48 +00:00 |
Daniel Marjamäki
|
81174a4817
|
mismatching allocation / deallocation: moved to --all
|
2009-01-31 17:54:31 +00:00 |
Daniel Marjamäki
|
f6f72fc022
|
errmsg: output severity in messages. a fix to track severity in the memory leaks check
|
2009-01-31 13:57:27 +00:00 |
Daniel Marjamäki
|
3457b38d7a
|
errmsg: write severity in the message
|
2009-01-31 08:33:31 +00:00 |
Daniel Marjamäki
|
b7b055e885
|
tokenizer: fixed TestTokenizer::sizeof1
|
2009-01-28 17:38:32 +00:00 |
Daniel Marjamäki
|
dd9cd9ce82
|
unused functions: Created command line parameter --unused-functions
|
2009-01-28 17:26:19 +00:00 |
Daniel Marjamäki
|
0ca38cc9fe
|
xml results: added a command line switch for generating simple results.xml file
|
2009-01-28 17:12:43 +00:00 |
Leandro Penz
|
b30e78e14c
|
MatchFunctionsThatReturnArg: calling Match only once.
|
2009-01-28 00:23:56 +00:00 |
Reijo Tomperi
|
2f7dec2fc3
|
Partial support for sizeof x, by converting it into sizeof(x). Does not handle complex structures. Closing ticket #65
|
2009-01-27 20:47:00 +00:00 |
Reijo Tomperi
|
64e3250f00
|
Fixed bug in multiCompare, which fixes ticket #66 ([False positive] "Buffer overrun" with "--all")
|
2009-01-27 19:30:01 +00:00 |
Daniel Marjamäki
|
762ae69304
|
function parameters: fixed segmentation fault (derefence null)
|
2009-01-27 07:39:11 +00:00 |
Daniel Marjamäki
|
d6ef44c73e
|
sprintf overlapping data
|
2009-01-27 07:21:52 +00:00 |
Reijo Tomperi
|
e764cc4f95
|
Fix ticket #25 (simplify "void f(x) int x; {" into "void f(int x) {")
|
2009-01-26 22:26:50 +00:00 |
Daniel Marjamäki
|
6ce23670e5
|
sprintf overlapping data: added extra text that is shown if --verbose is given
|
2009-01-26 19:14:46 +00:00 |
Daniel Marjamäki
|
3d61334a8c
|
errmsg: Moved 'function parameter parname is passed by value' to the style checks
|
2009-01-26 18:32:00 +00:00 |
Daniel Marjamäki
|
068b1458c2
|
memleak: class function usage (fixing #63)
|
2009-01-26 18:15:44 +00:00 |
Daniel Marjamäki
|
ca0f007ca4
|
tokenizer: simplify redundant paranthesis
|
2009-01-26 16:38:08 +00:00 |
Leandro Penz
|
9fb11bbfcc
|
memleak: strcat_result_assignment fixed by checking some functions for "x = func(x[),]".
|
2009-01-25 20:57:34 +00:00 |
Daniel Marjamäki
|
9c51729be6
|
preprocessor: stringify macros
|
2009-01-25 13:30:15 +00:00 |
Reijo Tomperi
|
ed2758b082
|
Updated comments in code
|
2009-01-25 11:11:18 +00:00 |
Reijo Tomperi
|
17eee5e4d7
|
Fix ticket #58 (If given path is empty it is assumed that it wasn't given)
|
2009-01-25 11:05:51 +00:00 |
Reijo Tomperi
|
22593adeac
|
Fix ticket #57 (wrong path in error message)
|
2009-01-24 20:34:16 +00:00 |
Daniel Marjamäki
|
5acc6aca31
|
preprocessor: insert space. '#if(' => '#if ('
|
2009-01-24 19:28:30 +00:00 |
Leandro Penz
|
04faae2882
|
memleak: *x=malloc(); func(&x) is no longer reported as a leak (eliminated &use2).
|
2009-01-24 18:55:56 +00:00 |
Reijo Tomperi
|
98d7f02ebc
|
Added test case preprocessor_and_operation for ticket #55 (also fixed style from previous commit)
|
2009-01-24 18:50:09 +00:00 |
Kimmo Varis
|
a0886e693e
|
Fix two overly long lines in command line help.
|
2009-01-24 18:24:04 +00:00 |
Daniel Marjamäki
|
0b95fdafb7
|
tokenizer: Added guard in case the preprocessor is mismatching
|
2009-01-24 17:15:38 +00:00 |
Daniel Marjamäki
|
fa070ac73c
|
cppcheck: printing preprocessed file to 'temp.txt'
|
2009-01-24 13:53:53 +00:00 |
Reijo Tomperi
|
d89f804d91
|
Fixed ticket #54 (Make cppcheck print status e.g. 4/20 files checked)
|
2009-01-24 08:06:40 +00:00 |
Daniel Marjamäki
|
9d29de02d3
|
removed windows encodings
|
2009-01-23 21:34:03 +00:00 |
Daniel Marjamäki
|
42e56153a4
|
borland and visual c++ fixes
|
2009-01-23 21:28:45 +00:00 |
Daniel Marjamäki
|
d9b9368238
|
reverted [1084] it can be fixed better
|
2009-01-23 21:14:41 +00:00 |
Daniel Marjamäki
|
f33675288e
|
borland: the strtol is found in <stdlib.h>
|
2009-01-23 21:08:51 +00:00 |
Daniel Marjamäki
|
6f40ed9796
|
include: Had to include <cstring> in a few places to be able to compile cppcheck
|
2009-01-23 20:55:06 +00:00 |
Reijo Tomperi
|
c9133fb85d
|
Add additional checking to avoid ethernal loops when someone is using incorrect different case for the same file.
It should be unlikely that anyone would actually use different files in the same project and separate them only by
casing of some letters.
|
2009-01-23 20:36:43 +00:00 |
Reijo Tomperi
|
8d6f41397a
|
Fixing ticket #35 (Get rid of #ifdefs in our code where possible)
|
2009-01-23 20:25:13 +00:00 |
Daniel Marjamäki
|
ca56520c29
|
memory leak: don't give false positive when deallocating member variable this->i (#53)
|
2009-01-23 19:24:52 +00:00 |
Daniel Marjamäki
|
9c94e66382
|
better fix to get rid of compiler warning is to comment the function parameter
|
2009-01-23 18:37:28 +00:00 |
Reijo Tomperi
|
6a523f2730
|
Fixed Ticket #52, Cppcheck hangs when checking VLC's source code
|
2009-01-23 18:27:04 +00:00 |
Daniel Marjamäki
|
193cffdb0b
|
preprocessor: fixed bug with mixed macros ABC and ABCD
|
2009-01-23 17:14:42 +00:00 |
Daniel Marjamäki
|
9af881d548
|
removed bam coding
|
2009-01-23 16:51:45 +00:00 |
Daniel Marjamäki
|
89f4a84c37
|
preprocessor: The stdlib.h is needed for the exit function
|
2009-01-23 11:34:19 +00:00 |
Daniel Marjamäki
|
de2675b46f
|
cppcheck: The '&&' should be '||' when checking if a check should be called
|
2009-01-22 21:20:40 +00:00 |
Reijo Tomperi
|
5de5eab9fe
|
Fix Ticket #46, invalid commandline. (Also added -h and --help parameters)
|
2009-01-22 20:26:04 +00:00 |
Daniel Marjamäki
|
67e4ea10c9
|
preprocessor: handle redefinition of macro
|
2009-01-22 20:19:07 +00:00 |
Reijo Tomperi
|
e897637c7a
|
Fix Ticket #30, Need a way to specify include file folders (-I parameter was added)
|
2009-01-22 19:59:50 +00:00 |
Daniel Marjamäki
|
a9e84c5cd5
|
preprocessor: handle include guards by not checking for configurations in header files
|
2009-01-22 18:19:17 +00:00 |
Nicolas Le Cam
|
f9191539a8
|
Code cleanup.
|
2009-01-21 22:07:22 +00:00 |
Reijo Tomperi
|
1ef2c5caf5
|
Fixed style
|
2009-01-21 21:58:06 +00:00 |
Nicolas Le Cam
|
b7e4f1319c
|
Fix Preprocessor::read to handle char constant of more than one char, fixing issue #45; Fix the test that handle the case.
|
2009-01-21 21:45:17 +00:00 |