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
Daniel Marjamäki
5de3c43209
changed id for new checker to unsafeClassDivZero
2017-10-21 21:45:04 +02:00
Ayaz Salikhov
64e61d28ba
Add an ability to use address sanitizer ( #979 )
2017-10-21 21:04:14 +02:00
Daniel Marjamäki
15d814e609
classPublicInterfaceDivZero: Try to make the error message a bit better. Added variable name and what the bad input value is.
2017-10-21 13:00:52 +02:00
Daniel Marjamäki
7a67bced71
classPublicInterfaceDivZero: extend bailout
2017-10-21 12:40:20 +02:00
Daniel Marjamäki
299835da2f
classPublicInterfaceDivZero: don't warn in overloaded operators. It is normal behaviour that these are not protected.
2017-10-21 08:56:23 +02:00
Daniel Marjamäki
05e1e5e0a0
astyle formatting
...
[ci skip]
2017-10-20 22:11:12 +02:00
Daniel Marjamäki
8a7411abdb
CheckClass: Fix wrong 'public interface' warnings
2017-10-20 22:10:55 +02:00
Daniel Marjamäki
819862ddcb
Fix compiler errors
2017-10-20 17:38:15 +02:00
Daniel Marjamäki
1d5e3e4f0c
Fixed #8247 (False positive knownConditionTrueFalse)
2017-10-20 17:31:58 +02:00
Daniel Marjamäki
86c84029e3
New check: Check public interface of classes ( #8248 )
2017-10-20 02:02:51 +02:00
Daniel Marjamäki
afbfc914bc
astyle formatting
...
[ci skip]
2017-10-20 01:53:20 +02:00
Dmitry-Me
5040491ee6
Size computation code not required outside this translation unit
2017-10-19 19:01:41 +03:00
Dmitry-Me
606e28a3c5
Extract and reuse size computation
2017-10-19 00:25:21 +03:00
Dmitry-Me
34a8d2431f
Extract and reuse size computation
2017-10-19 00:20:04 +03:00
Dmitry-Me
8709490903
Clarify expressions with parentheses
2017-10-18 23:40:43 +03:00
Dmitry-Me
e356ccca22
Revert "Clarify expression with parentheses"
...
This reverts commit bbf0a81c2d
.
2017-10-18 23:31:44 +03:00
Dmitry-Me
bbf0a81c2d
Clarify expression with parentheses
2017-10-18 23:24:31 +03:00
Sign Bit
aaafa72bc8
Use a 'negative cache' for tokens / enumerator checks ( #980 )
...
Checking whether a token is an enumerator in all the available scopes
is expensive. Once we determined that a token is not an enumerator,
skip all the expensive checks.
2017-10-18 18:01:36 +02:00
Dmitry-Me
151ace2581
Use Platform for char limits computation ( #972 )
2017-10-18 17:30:47 +02:00
Daniel Marjamäki
ad1749738e
Fixed #6153 (ValueFlowBeforeCondition: Handle global variables)
2017-10-17 16:55:37 +02:00
orbitcowboy
f1e5f64690
wxwidgets.cfg: Added support for wxMenu:Append().
2017-10-17 10:59:23 +02:00
Florin Iucha
6e737082da
Store the defined types in a map, for faster lookup
2017-10-17 09:00:14 +02:00
Florin Iucha
cccf035535
Memoize token nature computation
2017-10-17 09:00:14 +02:00
Daniel Marjamäki
4700b75ded
Clarify error message 'condition is always true/false'
2017-10-16 22:05:00 +02:00