Commit Graph

15607 Commits

Author SHA1 Message Date
Alexander Mai d492500f34 #5844 False positive: returnReference fp for inner lambda function 2016-05-20 23:46:56 +02:00
Simon Martin eb1b3db04a Address comments in PR#794 and alternative fix for ticket #7500. 2016-05-20 22:52:43 +02:00
Alexander Mai 80f445bf6f #7425 Broken XML output due to information about missing include paths. Use stdout for warning message (in alignment with other warnings messages). Minor refactoring (move some function from anon. namespace to static,etc.) 2016-05-20 21:32:59 +02:00
orbitcowboy d676022556 cfg: Added support for the Windows functions: DeleteFile() and _access(). 2016-05-20 15:19:41 +02:00
orbitcowboy fd8fb9e4f4 cfg: Fixed FP recently introduced for fopen_s() and glob(). 2016-05-19 13:21:05 +02:00
orbitcowboy 5095196530 cfg: Ignore return values of fopen_s functions. 2016-05-19 11:56:52 +02:00
orbitcowboy 0514e14cad posix.cfg: Added support for glob() and globfree(). 2016-05-19 11:51:49 +02:00
orbitcowboy b1b0c920e3 Removed sprintf_s from windows.cfg. 2016-05-19 08:22:40 +02:00
orbitcowboy 46adf180d7 cfg: Added support for fopen_s and sprintf_s functions. Fixed a wrong tests. 2016-05-18 09:31:26 +02:00
Alexander Mai 303a85a930 #4195 segmentation fault of cppcheck (invalid code). Fix segfault which turned up after refactoring the enum handling code. 2016-05-17 22:19:23 +02:00
Alexander Mai 4f77a2b044 #7500 buffer overflow: encodeMultiChar lib/mathlib.cpp:343. Improve errors handling 2016-05-17 20:43:32 +02:00
Daniel Marjamäki 7453b641bd Fixed #4839 (Variable (in array) is assigned a value that is never used) 2016-05-17 16:03:55 +02:00
orbitcowboy 41576ee8ec cfg: Added support for the Windows SetConsoleTextAttribute function. 2016-05-17 11:31:54 +02:00
orbitcowboy 2d1ab79d98 cfg: Added support for Windows functions PathIsDirectory,PathIsDirectoryA and PathIsDirectoryW. 2016-05-17 09:54:11 +02:00
orbitcowboy 53a37d6134 cfg: Added support for Windows function WideCharToMultiByte. 2016-05-17 09:35:30 +02:00
Boris Barbulovski 69cc64a717 Translate text for current Qt(not both Qt4 & Qt5). (#793)
Check Qt version on compile time, and translate text for current Qt version.
2016-05-16 22:02:31 +02:00
Daniel Marjamäki 99fc13ee70 Fixed #6968 (unusedPrivateFunction not correct, called by inner class) 2016-05-16 20:52:50 +02:00
Daniel Marjamäki 7fffc09b17 MathLib: Add #include for VS2013 2016-05-16 20:30:53 +02:00
Daniel Marjamäki 65998f1d7c CheckClass: previous change introduced false positives when Token::function() is wrong. Avoid those false positives. 2016-05-16 10:55:22 +02:00
Daniel Marjamäki bce15b1ade CheckClass: refactored the code, use symboldatabase instead of name comparisons when possible, fixed a FN. 2016-05-16 09:36:26 +02:00
amai2012 22542e7547 Merge pull request #794 from simartin/ticket_7452
Ticket #7452: Properly interpret escape sequences in character literals.
2016-05-15 20:35:50 +02:00
Daniel Marjamäki 2668cee3cf Fixed #6397 (FP deallocuse - conditional deallocation and conditional return) 2016-05-15 20:27:44 +02:00
Simon Martin 3af30e728c Ticket #7452: Properly interpret escape sequences in character literals. 2016-05-15 15:48:24 +02:00
Alexander Mai 9d1302d523 #7490 sizeof('a') should be sizeof(int) in C mode. Previous fix was hardcoding 4 for C. 2016-05-14 22:52:43 +02:00
Alexander Mai 4816394511 #5970 false positive in Uninitialized variable: d - casting struct var to char*. It got fixed since 1.72, add regression test 2016-05-14 22:36:54 +02:00
Daniel Marjamäki 2cb03b3fd0 Fixed #7409 (Tokenizer: Links not set properly 'Data<T&&>') 2016-05-14 20:40:30 +02:00
Daniel Marjamäki 7591a57587 Removed redundant valuetype debug output 2016-05-14 20:11:57 +02:00
Daniel Marjamäki 5a1bea2a09 Fixed #7244 (False memory leak when POD is allocated with value initialization and pushed onto container) 2016-05-14 14:56:51 +02:00
Alexander Mai 251fc022fa #7490 sizeof('a') should be 4 in C mode 2016-05-14 13:05:44 +02:00
amai2012 60efae147f Merge pull request #792 from boos/cwe-mapping-3
CWE mapping of selfAssignment, wrongmathcall, unpreciseMathCall, memsetZeroBytes, memsetFloat, memsetValueOutOfRange, clarifyCalculation, clarifyStatement
2016-05-14 12:26:33 +02:00
Roberto Martelloni afa8ad0ebe CWE mapping of selfAssignment, wrongmathcall, unpreciseMathCall, memsetZeroBytes, memsetFloat, memsetValueOutOfRange, clarifyCalculation, clarifyStatement 2016-05-14 10:13:33 +01:00
Kamil Dudka efe98883ab checkleakautovar: do not miss 'throw' followed by :: 2016-05-13 21:37:49 +02:00
Robert Reif 5631c765a7 SymbolDatabase: better handling when array size is given with expression involving enum constants. 2016-05-13 11:40:19 +02:00
Daniel Marjamäki 1d21cf5755 Tokenizer::setVarId: Refactoring, use continue in loops 2016-05-12 18:58:24 +02:00
Daniel Marjamäki 372763c85e Tokenizer: Refactoring, split up the big Tokenizer::setVarId() function 2016-05-12 18:20:20 +02:00
Daniel Marjamäki b04285514f Tokenizer: Refactoring; use early return 2016-05-12 15:51:30 +02:00
Daniel Marjamäki df6a66deed SymbolDatabase: Add test that makes sure enum constant values are calculated properly. Related with ticket #7493. 2016-05-12 12:07:40 +02:00
Daniel Marjamäki 613311cc57 Fixed #7493 (enumMismatch on Enum declaration) 2016-05-12 11:46:08 +02:00
Robert Reif 97bbb7da0d Fixed #7476 (SymbolDatabase: Wrong data with single ; in line) 2016-05-12 11:35:02 +02:00
Daniel Marjamäki 99d0dbf39c Tokenizer::setVarId: Refactoring, changed type name 2016-05-11 21:12:29 +02:00
Daniel Marjamäki b965cf5491 Fixed #7444 (Tokenizer::varId: Wrong varid when there is anonumous union in class) 2016-05-11 20:43:23 +02:00
Daniel Marjamäki bf8471e109 Fixed #7491 (Questionable enumMismatch) 2016-05-11 15:33:59 +02:00
amai2012 3a6e33d58e Add python 2.7+ requirement (see https://github.com/danmar/cppcheck/pull/751) 2016-05-11 11:58:05 +02:00
Daniel Marjamäki fb5e6d8a7d Fixed #6960 (New check: enum variable is assigned mismatching value) 2016-05-10 20:22:35 +02:00
Daniel Marjamäki f0fcb859c7 Tokenizer: use static keyword instead of anonymous namespace for variables 2016-05-10 16:17:52 +02:00
Daniel Marjamäki 98626e5a46 rundaca2.py: The START is an index 2016-05-10 11:00:57 +02:00
Daniel Marjamäki a167a2d242 TestSymbolDatabase: Add some tests for the new enum handling 2016-05-09 18:34:24 +02:00
amai2012 3dea23c99e Use new signature Tokenizer::createTokens 2016-05-09 17:14:51 +02:00
amai2012 d7d98689dd Merge pull request #791 from gleydsonsoares/ucontext_OpenBSD
fix build on OpenBSD
2016-05-09 16:48:46 +02:00
Daniel Marjamäki 8a13b5cd83 Fix Cppcheck warning 2016-05-09 13:08:00 +02:00