Daniel Marjamäki
b3c80947ed
Fixed #6508 (False positive unusedStructMember - brace initializer)
2017-11-12 22:33:17 +01:00
Daniel Marjamäki
526d8b76a6
Fixed #8271 (FP uninitMemberVar: Handle method call in middle of statement)
2017-11-11 21:28:24 +01:00
Daniel Marjamäki
31a1cebc5f
Fixed #8272 (setVarIdPass2: Broken parsing of class header)
2017-11-11 12:04:25 +01:00
Daniel Marjamäki
4740bf116f
Remove unused variable
2017-11-11 11:31:27 +01:00
Daniel Marjamäki
cbb23f14d2
astyle formatting
...
[ci skip]
2017-11-11 11:13:45 +01:00
BNT
cc4c9032de
Support relative paths in Visual Studio projects properties ( #995 )
...
* transform relative paths with the help of the project dir to absolute
paths so the actual checker can resolve include paths defined in
property sheets
* fix coding style (one-line if)
* add existing importproject testfile to visual studio project to appear
when loading solution
* also explicitly export struct from within class to enable linking in
testrunner
2017-11-11 11:13:18 +01:00
Daniel Marjamäki
b01772e4d1
Fix testcase
2017-11-10 21:28:13 +01:00
Daniel Marjamäki
6b1a2dcc5d
Fixed #7788 (Varid missing for member variable in ctor of template class)
2017-11-10 21:03:15 +01:00
Daniel Marjamäki
7ec0e41196
Fix Cppcheck performance warnings
2017-11-09 23:18:00 +01:00
Daniel Marjamäki
799f953c00
Fixed #8269 (Tokenizer: wrong varid (using namespace A::B))
2017-11-09 23:15:16 +01:00
Daniel Marjamäki
2408f01cc0
Fixed #8270 (Tokenizer: wrong varid (using namespace std))
2017-11-09 22:08:58 +01:00
Daniel Marjamäki
b67cf0a475
Improved handling of varid in complex scopes
2017-11-09 15:58:08 +01:00
Dmitry-Me
916acfc133
Reuse duplicated code for "x" and "u" scanf specifiers
2017-11-09 16:35:09 +03:00
Dmitry-Me
56ba48d705
Unify code handling "x" and "u" scanf specifiers
2017-11-09 16:25:56 +03:00
Dmitry-Me
94dd63f196
Fix FN for std::uintmax_t passed as %lx, %lu scanf read targets
2017-11-09 15:38:48 +03:00
Dmitry-Me
b301b44897
Fix FN for unsigned ptrdiff_t passed as %lu into scanf
2017-11-09 14:43:09 +03:00
Dmitry-Me
78be821431
Fix FN for std::uintmax_t passed as %llx, %llu scanf read targets
2017-11-09 11:28:07 +03:00
Daniel Marjamäki
cc08d51505
Fix Cppcheck warning (use prefix increment for iterator)
2017-11-09 08:40:13 +01:00
Daniel Marjamäki
26b9e1528c
Fixed #7000 (Invalid varid - matching class with same name from other namespace)
2017-11-08 22:52:27 +01:00
Dmitry-Me
74c778c5f0
Fix FN when unsigned ptrdiff_t is passed as %llu into scanf
2017-11-09 00:26:07 +03:00
Dmitry-Me
703d86992d
Fix FN when size_t, uintmax_t are passed as %Lx into scanf
2017-11-08 23:52:49 +03:00
Dmitry-Me
89b83b2d16
Fix FN for unsigned ptrdiff_t passed as %Ix into scanf
2017-11-08 15:06:51 +03:00
Dmitry-Me
970aee9ce1
Fix FN for ptrdiff_t passed as %zd into scanf
2017-11-08 14:22:03 +03:00
Dmitry-Me
aff993115f
Remove duplicate check
2017-11-08 00:53:18 +03:00
Dmitry-Me
4c186d2455
Remove dead code - %llf specifier doesn't exist
2017-11-07 22:57:44 +03:00
Dmitry-Me
06fd390b3f
Remove duplicate checks
2017-11-07 22:14:29 +03:00
Daniel Marjamäki
4a9984d73b
Fixed #8233 (FP uninitvar found in bash:lib/readline/display.c)
2017-11-06 10:28:07 +01:00
Daniel Marjamäki
8b384f8ee5
Fixed #4988 (Tokenizer::setVarId: Wrong varid for inline function parameter)
2017-11-05 22:25:46 +01:00
Daniel Marjamäki
324257ef52
Fixed #7823 (No varid for member variable of type std::bitset< static_cast<int>(2) >)
2017-11-05 17:59:34 +01:00
Daniel Marjamäki
511d14a051
astyle
...
[ci skip]
2017-11-05 17:56:24 +01:00
Daniel Marjamäki
4d8f069907
Renamed pro c sql to embedded sql
2017-11-03 21:04:12 +01:00
Ayaz Salikhov
19af9bc216
Fix UB when converting float to int ( #984 )
2017-11-03 14:05:23 +01:00
Daniel Marjamäki
4f6f1e20dd
Hide Pro*C SQL simplification. Use pro_c_sql.cfg library file if this is wanted.
2017-11-03 13:02:29 +01:00
Daniel Marjamäki
9b2936a66f
Code refactoring
2017-11-03 11:41:32 +01:00
Alexey Eryomenko
02461753f3
Fix for embedded PL/SQL blocks (Oracle Pro*C) ( #985 )
...
* fix for correct parsing of embedded PL/SQL blocks (Oracle Pro*C)
* enforce SQL block end at the end of nearest outer C block, when
appropriate terminator is not found
* added check for ; at the end of END-EXEC and made SQL block detection
more readable
2017-11-03 11:31:33 +01:00
Oleksandr Redko
a8700f5622
Remove redundant parts of conditional expressions ( #988 )
...
All issues were found with PVS-Studio:
V560 A part of conditional expression is always true: tok. astutils.cpp 407
V560 A part of conditional expression is always true: size > 0. checkbufferoverrun.cpp 709
V547 Expression 'secondTrue' is always true. checkcondition.cpp 1013
V547 Expression 'firstTrue' is always true. checkcondition.cpp 1020
V560 A part of conditional expression is always true: !scan. checkio.cpp 1036
V560 A part of conditional expression is always true: scope->function. checknullpointer.cpp 395
V560 A part of conditional expression is always true: tok2. checkstl.cpp 268
V560 A part of conditional expression is always true: par. tokenize.cpp 9440
V547 Expression '!erased' is always true. symboldatabase.cpp 3990
2017-11-03 10:39:57 +01:00
Dmitry-Me
fe5dd55723
Wrong reporting function was being called
2017-10-27 22:21:18 +03:00
Dmitry-Me
f653b36b87
Fix actual type reported for unsigned ptrdiff_t passed into scanf
2017-10-26 23:47:11 +03:00
Dmitry-Me
65b2755098
Extract common check and run it first
2017-10-26 23:42:38 +03:00
Björge Dijkstra
94031ef11d
Fix for conditional memory allocation inside if-condition ( #986 )
...
* Add test cases for allocation inside if-condition
* Fix missed memory leak and false positive double free for allocation inside if-condition
2017-10-26 19:11:00 +02:00
Dmitry-Me
a38854451f
Warn for signed values passed as scanf targets with "x" conversion
2017-10-25 21:22:17 +03:00
Dmitry-Me
eaa12db761
scanf with %zd expects ssize_t, not ptrdiff_t
2017-10-24 22:01:23 +03:00
Dmitry-Me
eb6bf1bcae
Cache and reuse value
2017-10-23 00:42:56 +03:00
Dmitry-Me
1de8f771e9
Cache and reuse value
2017-10-23 00:41:29 +03:00
Dmitry-Me
46f726c049
Cache and reuse value
2017-10-23 00:36:05 +03:00
Daniel Marjamäki
539258f7a3
Fix FP for pointer addition checker
2017-10-22 23:13:12 +02:00
Daniel Marjamäki
28cfee2d4f
Fixed #8250 (New check: Pointer calculation result cant be NULL unless there is overflow)
2017-10-22 14:32:54 +02:00
Daniel Marjamäki
002f6679d5
Fix syntax error
2017-10-21 22:17:07 +02:00
Daniel Marjamäki
c4c76aa1ad
Use MathLib::bigint_bits
2017-10-21 22:08:34 +02:00
Daniel Marjamäki
4cb3548e2b
unsafeClassDivZero: change severity to style
2017-10-21 21:51:58 +02:00