Pierre Schweitzer
cf12f2aaac
updated posix.cfg
2014-04-18 15:20:16 +02:00
Daniel Marjamäki
6146c8f5bb
Tokenizer: Fixed bad simplifyComma for code 'return a ? b = c , d : e ;'
2014-04-18 13:38:48 +02:00
Alexander Mai
1d78d74175
Add test to improve coverage of CheckIO::checkWrongPrintfScanfArguments()
2014-04-18 11:39:58 +02:00
Alexander Mai
ccba934cb1
#5684 The scope of the variable 'p' can be reduced - But it can not.
2014-04-17 21:32:56 +02:00
Daniel Marjamäki
064844f8db
Tokenizer: Fixed bad simplifyComma for code 'a ? b = c , d : e ;'
2014-04-17 18:47:55 +02:00
Daniel Marjamäki
8d5a9893d5
Fixed #5682 (False positive: (style) Same expression on both sides of '&&')
2014-04-16 16:04:46 +02:00
Daniel Marjamäki
5c116c622d
AST: Fixed iscast detection in '*((DWORD*)&buf[0])'
2014-04-15 15:46:26 +02:00
orbitcowboy
3d0217b69e
Implemented a slower but shorter version of MathLib::isNullValue() as suggested by PKeuS. Removed not needed test cases. Improved doxygen documentation for MathLib::IsNullValue().
2014-04-14 05:27:38 +02:00
Daniel Marjamäki
28751c8ad0
astyle formatting
...
[ci skip]
2014-04-15 06:32:25 +02:00
Daniel Marjamäki
4b6164087e
Use constant instead of magic number for AST recursion limit
...
[ci skip]
2014-04-15 06:31:09 +02:00
Daniel Marjamäki
cb830cb999
Code cleanup of stack depth tracking. Replaced class with simple POD variable.
2014-04-15 06:18:15 +02:00
PKEuS
076f7a7542
Fixed some coverity findings about dead code, fixed a misleading comment
2014-04-14 22:46:51 +02:00
Alexander Mai
ac24635056
Convert MathLib::toLongNumber() from template member function to toLongNumber() and toULongNumber() to avoid various problems compiling with Visual Studio
2014-04-14 20:30:38 +02:00
orbitcowboy
bd242c07eb
Fixed typo in travis script and tools/readme.md, no functional change.
2014-04-13 23:17:41 +02:00
Daniel Marjamäki
5ee85ee88a
ValueFlow: Improved handling of bitand against a single-bit integer literal
2014-04-14 06:45:39 +02:00
Alexander Mai
1ef99e2662
Try to avoid compiler warning for unary minus operator inside MathLib::toLongNumber<biguint>()
2014-04-13 19:20:44 +02:00
Mark de Wever
b4b340b7be
Fixed #5677 (Fix overzealous substr() warning)
2014-04-13 19:04:35 +02:00
PKEuS
dbf2c44a81
Simplified check registration:
...
- Use sorted insert instead of calling std::list<Check*>::sort() on each insertion
- Removed DJGPP/__sun hack in check.h (should be obsolete by our compiler requirements for C++11
2014-04-13 13:35:15 +02:00
Alexander Mai
40be775efa
#5592 (fix implementation detail to avoid warnings from cppcheck)
2014-04-13 13:08:38 +02:00
Daniel Marjamäki
79942df842
Fixed #5602 (false positive on std::vector - after unknown macro around the function header)
2014-04-13 13:05:30 +02:00
Alexander Mai
547803f581
#5592 - crash: gcc: testsuit: gcc.c-torture/compile/limits-declparen.c (Limit stack depth below createAst()
2014-04-13 12:47:54 +02:00
PKEuS
9bfc2b618b
Fixed crashes random crashes in multithreading caused by useless creation of CheckUnusedFunctions instance per thread.
2014-04-13 11:56:38 +02:00
Alexander Mai
73fc3d6a13
#5300 - Invalid encoding in XML output (use escape sequence string for non-printable characters)
2014-04-13 09:50:57 +02:00
Matthias Krüger
71b306ff64
Ran dmake
2014-04-13 00:03:15 +02:00
Philipp Kloke
c1c1ded766
Refactorized CheckStl::pushback():
...
- Use method from CheckNullPointer to find pointer dereference
- Replaced indendation counter by symboldatabase usage
2014-04-12 23:41:58 +02:00
Philipp Kloke
dfd9d32c4b
Refactorization: Removed whitespaces at the end of a token
...
Removed a redundant 'void'
2014-04-12 23:41:46 +02:00
Philipp Kloke
ddf34440b6
Refactorization: Replaced several Token::findmatch calls by symboldatabase usage
2014-04-12 23:41:46 +02:00
Philipp Kloke
776ad32a0b
Refactorized CheckStl::redundantCondition():
...
- Use symboldatabase
- Support erase() method
2014-04-12 23:41:46 +02:00
PKEuS
8cb3b13e56
Support "else if" and do-loop in CheckStl::checkDereferenceInvalidIterator()
2014-04-12 20:03:07 +02:00
PKEuS
e8ac355b39
Refactorized iterator checking:
...
- Fixed false positive #5669
- Use symboldatabase in CheckStl::pushback()
- Improved support for erase on std::vector and find
2014-04-12 20:03:07 +02:00
Daniel Marjamäki
1252c70449
Symbol database: tweaked tests
2014-04-12 20:02:34 +02:00
Martin Ettl
82092e412a
MathLib::isNullValue(): Fixed bug in detecting zero values. Improved test coverage of MathLib::IsNullValue().
2014-04-12 02:14:50 +02:00
Daniel Marjamäki
9d51bfd015
Fixed #5397 (False positive: Same expression on both sides of '&')
2014-04-12 16:06:31 +02:00
PKEuS
7ffc313748
Save "->" in Token::originalName if simplified to "."; Fix false positive #4890 .
2014-04-12 12:04:56 +02:00
PKEuS
9c921ab657
Fixed handling of member function pointers in setVarId and SymbolDatabase ( #4577 )
2014-04-12 12:04:55 +02:00
PKEuS
83f4657e69
Fixed remaining issue in #3503 : Member function taking a function pointer must not be "simplified" to a variable initialization
2014-04-12 12:04:55 +02:00
PKEuS
92839ab4d2
Refactorizations:
...
- Rearranged members of Value to reduce structures size
- Removed redundant ctor of Value
- Fixed VS warning in tokenize.cpp
2014-04-12 12:04:55 +02:00
Alexander Mai
718e42f5ca
Fix some clang warnings about type conversions
2014-04-11 23:35:53 +02:00
Alexander Mai
9ac83d7624
reduce is linking against LIBS as well, to keep build scripts e.g. on travis working
2014-04-11 23:24:47 +02:00
Alexander Mai
fb13c56ef0
Makefile: reduce now also depends on LIBOBJ: command not found
2014-04-11 22:27:29 +02:00
Alexander Mai
6da6508913
Extract new function MathLib::isDec() our of isInt()
2014-04-11 22:15:25 +02:00
orbitcowboy
6be53376f4
MathLib:IsNullValue(): removed commented out code.
2014-04-11 01:28:16 +02:00
orbitcowboy
9c08885caf
MathLib:IsNullValue(): using a Finite State Machine to determine a string value contains a numeric NULL value. The NULL value can be Integer, Binary, Hex, Octal. The corresponding unit test cases are also included.
2014-04-11 01:27:05 +02:00
Philipp Kloke
1fafc7f4dc
Refactorization: use MathLib::isNullValue in CheckOther::checkMemsetInvalid2ndParam(); Fixed it to support also float literals like "0.f"
2014-04-11 14:17:36 +02:00
Philipp Kloke
cf30fab413
Refactorized inefficient usage of Token::findmatch in two checks in checkother.cpp
2014-04-11 14:17:35 +02:00
Philipp Kloke
20c3a5baf0
Refactorized switchCaseFallThrough: Removed lots of obsolete code
2014-04-11 14:17:35 +02:00
orbitcowboy
66329fe8b8
posix.cfg: Fixed FP for isatty() function and added unit cases.
2014-04-10 17:53:04 +02:00
Robert Reif
7eb3988415
Fixed #5659 (False negative: mismatching allocation / deallocation whith using namespace)
2014-04-11 05:40:37 +02:00
Alexander Mai
ab2f8bfba3
Tidy up MathLib::isInt() - using a state machine approach
2014-04-10 22:46:55 +02:00
PKEuS
b10fce304e
Don't suggestInitializationList for arrays used as initializer ( #5640 )
2014-04-10 22:28:02 +02:00