PKEuS
d98ee357d4
Fixed crash #4135 when using Q_DECLARE_METATYPE
2012-09-03 11:30:36 +02:00
PKEuS
2be2738c6e
Moved duplicate code into function in CheckOther::checkRedundantAssignment()
2012-09-03 10:46:51 +02:00
Kartik Bajaj
ea0cbbcf78
Fixed #1481
2012-09-02 18:50:17 +02:00
PKEuS
81ff721113
Fixed variable shadow warning
2012-09-02 17:00:16 +02:00
PKEuS
7bd732efe4
Invented a fix that compiles on GCC and doesn't crash.
2012-09-02 16:53:38 +02:00
PKEuS
794a491515
Fixed two other compilation errors on GCC.
2012-09-02 16:42:38 +02:00
PKEuS
8a474add19
Fixed compilation error - added missing function in symboldatabase.
2012-09-02 14:30:00 +02:00
deepak gupta
24659dee92
Fixed #4087
2012-09-02 14:26:39 +02:00
PKEuS
2d64b69cf4
New check: Detect redundant assignment to a variable and redundant copying to a buffer
...
This check partially replaces the check for redundant assignments in switch
2012-09-02 13:09:32 +02:00
Deepak Gupta
4202866100
Fixed #4096 (Improve check: Buffer overrun in for loop, postfix increment in array access)
2012-09-01 19:17:28 +02:00
pranav1509
6f6baa67e4
Added more patterns to redundant condition check.
2012-09-01 13:39:32 +02:00
PKEuS
c20adf91bf
Moved simplification of wide character string literals (L"foo") to tokenize(). Token::isLong flag used to indicate that string is a wchar_t literal.
2012-09-01 13:12:47 +02:00
PKEuS
dcf997007b
Incremented version numbers to 1.57 dev
2012-09-01 13:04:09 +02:00
Daniel Marjamäki
b8db27fcd1
1.56: Set versions
2012-09-01 10:54:15 +02:00
Daniel Marjamäki
d7e521845b
SymbolDatabase: Made function static after self-check suggestion
2012-09-01 10:46:09 +02:00
Daniel Marjamäki
769cd4503d
Preprocessor: Made function static after self-check suggestion
2012-09-01 10:32:27 +02:00
Daniel Marjamäki
15bc552b37
Tokenizer: Fixed possible NULL pointer dereference
2012-09-01 10:11:18 +02:00
Daniel Marjamäki
a8d419820b
Tokenizer: removed unused variable
2012-09-01 09:57:48 +02:00
Ankita-gupta
ff7373f46f
Fixed bug in Token::Match ( #3720 )
2012-08-30 13:33:19 +02:00
Edoardo Prezioso
0d26a79f2c
Tokenizer::simplifyEmptyNamespaces: new function.
...
It removes from the token list, if found, the following tokens: 'namespace %var% { }'. It won't involve C code.
2012-08-28 22:40:25 +02:00
PKEuS
bbce79d7b3
Small refactorization: Handle std::map more efficient in setVarIdStructMembers()
2012-08-28 12:57:11 +02:00
PKEuS
ea85dd305a
Fixed #4086 : Set varId in initialization list.
2012-08-28 12:44:40 +02:00
Daniel Marjamäki
9fe9944adb
Fixed #4034 (false positive:(error) Dereferencing 'cfileP' after it is deallocated / released)
2012-08-28 06:38:38 +02:00
Daniel Marjamäki
a7e67ac379
CheckObsoleteFunctions: asctime and ctime are not posix functions
2012-08-27 18:49:48 +02:00
Daniel Marjamäki
03f6a19dbd
astyle formatting
2012-08-27 15:52:03 +02:00
Daniel Marjamäki
0d82b08080
Fixed #4040 (false positive: (error) Uninitialized variable: iter)
2012-08-27 15:48:21 +02:00
PKEuS
671f1b83d9
Fixed false positive: Return value of std::remove() ignored when std::remove(char*) is called ( #4093 )
2012-08-27 14:28:16 +02:00
Daniel Marjamäki
263e13e924
astyle formatting
2012-08-27 06:33:56 +02:00
PKEuS
4bab7f0ee2
Removed unused and obsolete functions Tokenizer::getParameterName() and Tokenizer::getNameForFunctionParams()
2012-08-26 16:53:40 +02:00
PKEuS
046712aaec
Removed --doc formating hack that removes more than three newlines and added format testing of Check::classInfo instead.
...
- Fixed test failures shown by new test.
Use const_iterator instead of iterator in testcppcheck.cpp when possible
2012-08-26 16:22:46 +02:00
PKEuS
4b1075b34b
Fixed #3729 : Don't suggest recursive call to optimize away c_str()
2012-08-26 10:56:46 +02:00
PKEuS
839f7a32a4
It is ok to pass a nullpointer as first argument to mbstowcs and wcstombs, which then just return how long the buffer has to be to store the result.
2012-08-26 10:41:48 +02:00
PKEuS
6893948c72
Bugfix: Reset property info when Token::link() is set (< can be a bracket or a comparison operator). Fixes #4075 .
2012-08-26 10:23:16 +02:00
PKEuS
8301b5d4d6
Bugfix for bugfix of Token::varId - Change Token::type also if varId is set to 0
2012-08-26 10:04:22 +02:00
PKEuS
662b0d2dbe
Simplify 0[foo] to *(foo) ( fixes #4083 )
2012-08-26 10:03:05 +02:00
PKEuS
9fa7e15fb4
Fixed setVarId for nested templates ( #3976 , #3769 ) and support C++11 right angle brackets in TemplateSimplifier::templateParameters()
2012-08-26 09:49:38 +02:00
Reijo Tomperi
7ddd564ad6
Change file encoding to UFT-8 like it is for other files.
2012-08-26 00:12:38 +03:00
Daniel Marjamäki
f127728582
Enable --std=c11 and --std=c++11 by default
2012-08-25 21:57:45 +02:00
Daniel Marjamäki
41797d409d
Fixed #4036 (cppcheck hangs with 100% cpu load)
2012-08-25 13:24:17 +02:00
Daniel Marjamäki
7975ffba21
Fixed #3980 (Variable not assigned a value)
2012-08-25 13:07:33 +02:00
PKEuS
bb068d2f78
Fixed false positive #4039 : Handle operator precedence in CheckStl::size()
2012-08-25 12:36:13 +02:00
Daniel Marjamäki
985ac662ee
Fixed #4035 (False positive: Memory leak: pTempFile)
2012-08-25 12:00:25 +02:00
Daniel Marjamäki
5051837c1a
Reverted last commit. I pushed it by mistake.
2012-08-25 11:00:51 +02:00
Daniel Marjamäki
5e1ccfaf90
Fixed #4035 (False positive: Memory leak: pTempFile)
2012-08-25 10:55:20 +02:00
PKEuS
808c3468c9
New check: detect suspicious comparison of string literal with char* variable
...
Bugfix: Update Token type when varId is set
2012-08-24 14:25:17 +02:00
PKEuS
76fbcce13f
Restored (intentional) content of screwed up commits 1bcdf4ce3d
and 674f7980d519712ff16d8f874dfe55a84deb4b5b:
...
- New check (Inconclusive): Array filled incompletely with memset/memcpy/memmove
-- This check only warns if the number of elements is given as size in bytes to memset, memcpy or memmove and if the size of an element is larger than 1 Byte. It does not warn for random numbers
- New check: Detect ineffective statements like '*foo++;' (Should be: '(*foo)++;')
Sorry for the inconveniences.
2012-08-24 11:28:50 +02:00
Edoardo Prezioso
0f1accc2da
Revert latest two commits as they break the compilation and the style. PKEuS???
2012-08-24 00:10:19 +02:00
PKEuS
1bcdf4ce3d
New check: Detect ineffective statements like '*foo++;' (Should be: '(*foo)++;')
2012-08-23 12:28:40 -07:00
PKEuS
674f7980d5
New check (Inconclusive): Array filled incompletely with memset/memcpy/memmove.
...
This check only warns if the number of elements is given as size in bytes to memset, memcpy or memmove and if the size of an element is larger than 1 Byte. It does not warn for random numbers
2012-08-23 11:27:00 -07:00
Daniel Marjamäki
d24badbfda
Fixed #4068 (Endless loop inside MathLib::add())
2012-08-22 20:50:39 +02:00