Commit Graph

4560 Commits

Author SHA1 Message Date
kchrist 740e790bf1 Fixed #4649 (false positive: Used file that is not opened; variables in struct) 2013-03-15 06:42:46 +01:00
Daniel Marjamäki c0a34649c4 fixed 'duplicate expression' false positives for float-float. Ticket: #4639 2013-03-14 19:11:29 +01:00
Daniel Marjamäki 369e80b021 Fixed #4465 (syntax error on valid C++ source file) 2013-03-14 18:52:22 +01:00
Daniel Marjamäki fe046a3350 CheckBufferOverrun: Fixed Cppcheck warning 'variable scope can be reduced' (found by travis) 2013-03-14 18:25:28 +01:00
PKEuS 096fa2f771 Fixed #4380 2013-03-14 10:18:48 -07:00
PKEuS ed477ceb74 Fixed false negative mentioned in #4354. 2013-03-14 09:27:42 -07:00
PKEuS 641ac5c02a Fixed #4352: Ensure that class provides an iterator interface. 2013-03-14 09:00:22 -07:00
PKEuS 0b22cb932e Fixed crash in test suite (#4595) 2013-03-14 04:21:38 -07:00
Robert Reif 4b9b87e310 Fixed #4646 (false positive: (style, inconclusive) Technically the member function 'C<T>::operator+=' can be const.) 2013-03-14 06:34:12 +01:00
Alexander Mai f43ea5c491 Fixed #4594 (Analyzing errors about system headers not being found) 2013-03-13 19:50:50 +01:00
Daniel Marjamäki 1f04e2c228 Fixed #4439 (False positive: Uninitialized variable (casting address)) 2013-03-13 17:32:47 +01:00
Alexander Mai 59d636742e Fixed #4594 (Analyzing errors about system headers not being found) 2013-03-13 06:48:33 +01:00
Robert Reif ee942c5592 Symbol database: Fixed --debug printing. Ticket: #4650 2013-03-13 06:31:13 +01:00
PKEuS 292e52364c Refactorizations:
- Removed empty implementation of CheckUninitVar::runChecks()
- Avoided unnecessary string copying
2013-03-12 08:11:18 -07:00
PKEuS 796c3e101f Implemented better fix for #4644 2013-03-12 08:05:03 -07:00
PKEuS 2333aa2cc7 Don't use native separators for suppression matching 2013-03-12 07:53:18 -07:00
PKEuS 14feaa8d39 Refactorizations:
- Fixed lots of cppcheck messages about functions that can be const or static
- Fixed possible nullpointer dereference message in symboldatabase.cpp
- Replaced tokAt(+-1) by next()/previous()
2013-03-12 07:42:00 -07:00
Alexander Mai 9d88cc63e8 Fixed #4642 (False positive: Returning an address value in a function with integer return type is not portable. (not returning address)) 2013-03-12 06:49:13 +01:00
Ettl Martin 3d1cdd0eec #4645 implemented correct range according manpage of usleep(). 2013-03-11 17:38:03 +01:00
Ettl Martin bb115573f7 #4645 implemented new check: (POSIX) argument of function usleep() too big. 2013-03-11 17:04:30 +01:00
PKEuS b3a9ac5c3b Fixed #4644: Don't assign varid to template parameter when 'typename' is used 2013-03-10 06:11:25 -07:00
Daniel Marjamäki 1f40af2ae2 Fixed #4637 (false positive: (error) Uninitialized member variable (missing function inlining)) 2013-03-09 17:55:49 +01:00
Robert Reif 25c36b56fa CheckClass: made warnings about uninitialized members in default constructors inconclusive. Ticket: #4639 2013-03-09 09:20:48 +01:00
PKEuS 1fbef0e4e6 Reduced code duplication in symboldatabase 2013-03-05 10:53:24 -08:00
PKEuS 9287e40e99 Incresed constness of several pointers in symboldatabase 2013-03-05 09:42:42 -08:00
PKEuS 3a35944c9e Changes in token.h/cpp:
- Properly set Token::_type to eVariable, eFunction or eName, depending on _function, _variable or _varId being set.
- Token can't be a variable and a function at a time - put Token::_function and Token::_variable into a union.
2013-03-05 08:50:01 -08:00
PKEuS 99a73fe1d3 Don't assign a varid to a variadic function 2013-03-05 08:32:52 -08:00
PKEuS a94598e447 Fixed some gcc and cppcheck messages 2013-03-05 07:07:59 -08:00
PKEuS ca96aaa53b Avoided unnecessary usage of symbolDatabase->isClassOrStruct() 2013-03-05 06:55:31 -08:00
PKEuS 5bdb74ca40 Refactorized CheckOther::checkRedundantCopy():
- Iterate over variable list instead of token list
- Don't stop whole checking after bailing out (continue; instead of break;)
- Support types with qualified names
2013-03-05 06:53:09 -08:00
PKEuS 7bc729bc63 - Moved more functionality from Scope to Type: BaseInfo and FriendInfo
- Replaced Scope->findQualifiedScope by SymbolDatabase::findScope
- Improved SymbolDatabase::findType
2013-03-05 06:28:40 -08:00
PKEuS 66a3555897 Implement initial support for Types in Symboldatabase:
- For each class/struct/union, a Type instance is added to SymbolDatabase::typeList.
- A scope is no longer created for declared but not defined types

Fixed name detection for classes when they are declared like this: "class ::Foo::Sub {..."
2013-03-05 04:33:38 -08:00
PKEuS 0f03995995 Added support for different containers, while-loops and if to CheckStl::stlOutOfBounds() 2013-03-04 10:59:46 -08:00
Daniel Marjamäki b3a2b69120 fixed gcc warning 2013-03-04 19:28:27 +01:00
Daniel Marjamäki 78a3a58a5a Fixed #4628 (False positive: Variable is assigned a value that is never used) 2013-03-04 19:13:49 +01:00
Ettl Martin cc6d138209 fixed gcc warning about missing braces 2013-03-04 14:30:01 +01:00
Ettl Martin 687c3a4654 Merge branch 'master' of github.com:danmar/cppcheck 2013-03-04 14:25:51 +01:00
Ettl Martin c9b519bcd1 improved check: checkCastIntToCharAndBack. The check now handles (cin.get() != EOF) patterns. 2013-03-04 14:25:35 +01:00
PKEuS 34b1d75a10 Fixed handling of std::vector::insert() in CheckStl::pushback() 2013-03-04 02:57:09 -08:00
PKEuS c24527dbde Improved handling of dereferences in CheckClass::noMemset(), fixing false negatives and false positives related to multidimensional arrays and arrays of pointers. 2013-03-04 02:47:29 -08:00
PKEuS dc65667cec Fixed message about unused variable introduced in last commit 2013-03-03 10:46:01 -08:00
PKEuS 8a18f9ec3b Rewrote CheckOther::checkVariableScope() 2013-03-03 10:35:33 -08:00
PKEuS 5c1a05dcbe Refactorizations in CheckOther:
- Make CheckOther::checkCastIntToCharAndBack() work for multiple variables at once
- Improved messages of CheckOther::checkSuspiciousSemicolon() and CheckOther::checkPipeParameterSize()
2013-03-03 09:54:44 -08:00
PKEuS d78c06dc3f Replaced _settings->isEnabled("style") by _settings->isEnabled("warning") wherever warnings are issued 2013-03-03 02:41:59 -08:00
PKEuS d49f4a611a Reduced code duplication in tokenizer 2013-03-02 09:19:53 -08:00
Daniel Marjamki c4419ea920 AST: create possible NULL pointer dereference if tokenlist is empty. Ticket: #4630 2013-03-02 15:49:48 +01:00
Daniel Marjamki b9aba17b23 astyle formatting 2013-03-02 15:48:22 +01:00
Alexander Mai 0dca6e51a0 Fixed #4622 (Patch: Improve formatting for custom templates) 2013-03-02 15:16:18 +01:00
Daniel Marjamäki 9d195144ea CheckClass: Fixed GCC warning 2013-03-02 07:30:55 +01:00
Robert Reif ec7843e911 Fixed #4629 (False positive: warning (uninitMemberVar) - regression) 2013-03-02 07:24:51 +01:00