Daniel Marjamäki
e8451b5d91
add missing flag. this testcase should only run in non-simplified mode.
2014-07-30 12:18:47 +02:00
Daniel Marjamäki
473b1bdb2b
Multicondition: Fixed FP when using dynamic_cast
2014-07-30 11:23:09 +02:00
Daniel Marjamäki
fdfea717c6
Suspicious string comparison: Refactoring using AST. Fixed FP in Lac.
2014-07-28 14:27:35 +02:00
Robert Reif
90bc59e0fa
Fixed #6009 (Detect type mismatch in printf-like function when type is returned)
2014-07-28 09:16:35 +02:00
Daniel Marjamäki
76020d2ad0
astIsFloat: expression 'floatvar ? 0x40 : 0' is not float
2014-07-26 09:09:58 +02:00
Daniel Marjamäki
328cc7b8f5
Fixed #5996 (false positive: Clarify calculation precedence for '+' and '?'.)
2014-07-19 18:29:53 +02:00
Daniel Marjamäki
af2b94e322
Fixed #5826 (Change error message for 'throw in destructor' check)
2014-07-19 03:29:50 +02:00
Daniel Marjamäki
2cc31acabb
Fixed #5922 (FP: passedByValue for std::string::value_type)
2014-07-18 15:51:59 +02:00
Alexander Mai
55e45add4a
Fix compiler warnings
2014-07-17 20:04:56 +02:00
PKEuS
8c96cc59c9
Fixed false positive #5976 : Properly handle shift from stream.
2014-07-17 10:03:58 +02:00
Daniel Marjamäki
15bb447fdc
Fixed #5965 (False positive zerodiv - loop iterating over double variable)
2014-07-17 08:44:55 +02:00
Daniel Marjamäki
5bdd197b01
Fixed #5981 (FP: nullPointer on repeated switch)
2014-07-16 09:12:56 +02:00
Daniel Marjamäki
cb9d67b9ec
Fixed #5901 (False positive: (error) Using 'memcpy' with vector of uint8_t items)
2014-07-09 15:00:06 +02:00
Daniel Marjamäki
14def42c99
Fixed #5972 (FP: Buffer is accessed out of bounds)
2014-07-08 16:31:08 +02:00
Daniel Marjamäki
254b6438b9
CheckBufferOverrun::checkStringArgument: sizeof string is strlen+1
2014-07-08 16:04:09 +02:00
Daniel Marjamäki
9a4bd73a18
Fixed unit test
2014-07-08 08:02:02 +02:00
Daniel Marjamäki
987ce5a408
Fixed #5968 (False positive: 'Possible null pointer dereference' when checking null in negated conjuction)
2014-07-07 17:48:58 +02:00
Daniel Marjamäki
3169a2d215
astyle formatting
...
[ci skip]
2014-07-06 17:50:21 +02:00
amai2012
0ddd7752b5
Avoid crash reported in #5943 (using the example from duplicate ticket #5971 )
...
Replace a few size_t/unsigned int by std::size_t
2014-07-06 14:48:24 +02:00
amai2012
f1bf38004b
Fix MSVC compiler warnings
2014-07-06 13:08:22 +02:00
Daniel Marjamäki
0fd334911a
Fixed #5257 (Check memcpy size for string literals)
2014-07-06 08:41:39 +02:00
Daniel Marjamäki
53aa2f5982
astyle formatting
...
[ci skip]
2014-07-06 07:16:28 +02:00
amai2012
77095e2b05
Add some more functions to posix.cfg which allow to enable TestBufferOverrun::buffer_overrun_1_posix_functions
...
Fix some compiler warnings on MSVC
2014-07-05 22:47:10 +02:00
Daniel Marjamäki
a3acc3241e
Library: Added <minsize> element used for buffer overrun checking
2014-07-05 20:31:43 +02:00
PKEuS
719304a8fc
Added internal check for || and | inside Token::Match patterns.
2014-07-02 15:51:18 +02:00
PKEuS
b4f0869a71
Reduced Token::Match complexity, better support for complex patterns
2014-07-02 15:25:41 +02:00
PKEuS
817d32f791
Fixed and cleaned up Token::Match engine
2014-07-02 15:25:19 +02:00
Zachary D. Blair
f6523e384b
Fixed 4979 (Doesn't allow any ordering of int modifiers)
2014-07-01 23:59:04 -07:00
PKEuS
3d0ebe196b
Several improvements to CheckUnusedVar::checkFunctionVariableUsage_iterateScopes():
...
- Use AST in some places
- Fixed misusage of Token::isStandardType (fixes false negative)
- Removed some redundant conditions
2014-07-02 00:18:40 +02:00
Daniel Marjamäki
b7d7633b97
ValueFlow: Improved analysis after switch
2014-06-30 17:56:42 +02:00
Daniel Marjamäki
f1762f9ed6
Fixed #5939 (fp: Possible null pointer dereference, after check against NULL in for loop)
2014-06-30 07:26:48 +02:00
Daniel Marjamäki
df799f97c5
valueFlowBefore: better analysis of conditional assignment
2014-06-30 00:02:49 +02:00
Daniel Marjamäki
4f43e4f9aa
Fixed #5959 (ValueFlow: return value from subfunction)
2014-06-29 18:04:38 +02:00
Daniel Marjamäki
893996d182
Fixed #5937 (ValueFlow: wrong analysis of calculations with different variable operands)
2014-06-29 10:57:39 +02:00
Daniel Marjamäki
41baffdda1
Fixed #5850 (Wrong Message on self assignment)
2014-06-28 15:26:22 +02:00
Daniel Marjamäki
ab08883332
Merge pull request #351 from simartin/ticket_5952
...
Ticket #5952 : Simplify redundant parentheses in pointer variable declarations
2014-06-28 12:20:27 +02:00
Daniel Marjamäki
9eaadc81e2
Fixed #5861 (valueFlowSubFunction: fp for float value)
2014-06-28 12:04:20 +02:00
Simon Martin
7b942650c2
Ticket #5952 : Simplify redundant parentheses in pointer variable declarations.
2014-06-28 09:36:51 +02:00
Daniel Marjamäki
6c8558c112
CheckBufferOverrun: Removed old for-loop handling. This is handled through ValueFlow from now on.
2014-06-27 06:46:42 +02:00
Alexander Mai
b6a40fceb7
Fix some compiler warnings
2014-06-26 20:34:07 +02:00
Daniel Marjamäki
036b2f8ccf
CheckBufferOverrun: Added bufferOverrun2 that is based on ValueFlow/SymbolDatabase/Ast from the start. Replaced some old checking.
2014-06-26 17:36:20 +02:00
Daniel Marjamäki
72992c7973
AST: fixed ast for '++i;'
2014-06-26 17:31:57 +02:00
PKEuS
ec1bd420a7
Refactorizations optimizing std::string usage:
...
1) Added global static const std::string emptyString; object:
-> Replaces some static variables in functions which might be not threadsafe
-> Avoids constructor call (std::string::string(""))
-> Even functions that return an empty string in some branches can return by reference now.
Added to config.h to ensure that it is available everywhere
2) Added overloads for TestFixture::assertEquals for the most common use cases:
-> Moves conversion from const char[] to std::string into a function, reducing code duplication in binary.
2014-06-26 11:51:02 +02:00
PKEuS
e13de2681e
SymbolDatabase: 'const' can't be the name of a variable - fix use after free #5882
2014-06-26 09:19:57 +02:00
PKEuS
e80104327a
AST: Fixed detection of operator new/delete - don't hang when C code is checked as C++ ( #5910 )
2014-06-26 09:19:57 +02:00
Daniel Marjamäki
5af96c2dd8
Fixed #5947 (valueFlowForward: forward conditions not handled properly)
2014-06-25 16:00:56 +02:00
orbitcowboy
95c49ec5dc
Extended std.cfg about more missing functions. Moved POSIX functions to posix.cfg. Extended posix.cfg about more memory allocating functions.
2014-06-25 12:00:24 +02:00
Daniel Marjamäki
c77786a745
valueFlowAfterCondition: wrong analysis for floats
2014-06-25 06:17:44 +02:00
Daniel Marjamäki
54aede9086
Fixed #5941 (ValueFlow: Wrong value in subfunction under ?)
2014-06-24 19:30:46 +02:00
Daniel Marjamäki
1ae6531c4c
Fixed #5923 (false positive: (error) Resource leak: fp (static file pointer))
2014-06-23 16:05:28 +02:00