Daniel Marjamäki
8dd641b8be
Use OVERRIDE in test
2019-01-12 15:45:25 +01:00
Daniel Marjamäki
b79619832e
Clarify warning
2018-12-23 12:42:18 +01:00
Daniel Marjamäki
bc34f0239d
Disable the subfunction value flow analysis. It does not work well and needs to be rewritten. There are false positives.
2018-12-18 14:36:49 +01:00
orbitcowboy
2f032d8fa7
Improved const correctness of local variables. ( #1396 )
...
* Improved const correctness of local variables.
* Running astyle [ci-skip].
* Removed duplicate 'const'-keyword.
2018-09-24 15:08:16 +02:00
Daniel Marjamäki
b9c1308a81
Fixed #8575 (false positive: longCastAssign)
2018-06-04 22:51:21 +02:00
IOBYTE
ce50df8047
Fix override warnings. ( #1234 )
2018-05-15 16:37:40 +02:00
Daniel Marjamäki
7e4dba6a7e
Updated copyright year
2018-03-31 20:59:09 +02:00
orbitcowboy
a4ab30cbe3
Replace uint8_t with short to fix CI.
2018-02-20 00:22:14 +01:00
orbitcowboy
46b4a502df
Added missing include.
2018-02-20 00:18:20 +01:00
orbitcowboy
b7b376d901
checkTypes: Take into account type promotion to integer.
2018-02-19 23:55:38 +01:00
orbitcowboy
b1b3164259
checktype: Added handling of 'short'-type and added test cases.
2018-02-18 21:09:19 +01:00
orbitcowboy
50844aa7fc
checkType: Take into account the size of char.
2018-02-18 14:28:48 +01:00
Daniel Marjamäki
c4caee6b18
Updated copyright year
2018-01-14 15:37:52 +01:00
Daniel Marjamäki
840c7eb258
checkFloatToIntegerOverflow: check all calculations, not only in function bodies
2017-09-19 19:30:24 +02:00
Daniel Marjamäki
9268c2034a
checkSignConversion: check all calculations, not only in function bodies
2017-09-19 19:25:33 +02:00
Daniel Marjamäki
f6e30eee19
checkIntegerOverflow: handle long and long long also
2017-09-19 19:14:29 +02:00
Daniel Marjamäki
cac7146cac
checkIntegerOverflow: check all calculations, not only in function bodies
2017-09-19 14:43:48 +02:00
Daniel Marjamäki
6bc0df2908
checkTooBigBitwiseShift: Separate id for signed shift overflow
2017-09-19 09:21:20 +02:00
Daniel Marjamäki
be0ad20a04
checkTooBigBitwiseShift: bitshift overflow when lhs is signed
2017-09-19 09:08:44 +02:00
Daniel Marjamäki
71b0370389
Fixed #1793 (CheckType::checkFloatToIntegerOverflow: assignments)
2017-08-23 05:34:47 +02:00
orbitcowboy
61e47208eb
Removed hard coded avr8 platform and moved it into a platform file (avr8.xml).
2017-08-09 11:58:27 +02:00
Ayaz Salikhov
28aa939d69
iwyu - include what you use
2017-05-27 04:33:47 +02:00
orbitcowboy
ffe6582e6b
Added platform support for Atmel AVR 8 bit microcontrollers.
2017-05-22 14:46:19 +02:00
Daniel Marjamäki
8ef9ab26b1
Clarify floatConversionOverflow
2017-05-22 11:04:24 +02:00
Daniel Marjamäki
0cb1c4f221
Clarify integerOverflow messages
2017-05-22 10:10:56 +02:00
Matthias Krüger
494f64cb88
tests: fix some self-check findings about functions that can be static.
...
Was:
[test/testtype.cpp:223]: (performance, inconclusive) Technically the member function 'TestType::removeFloat' can be static.
[test/testsymboldatabase.cpp:61]: (performance, inconclusive) Technically the member function 'TestSymbolDatabase::getSymbolDB_inner' can be static.
[test/teststl.cpp:1437]: (performance, inconclusive) Technically the member function 'TestStl::getArraylength' can be static.
2017-04-09 17:28:00 +02:00
Daniel Marjamäki
28af5c0379
Integer Overflow: Don't warn about left-shift expressions with negative result like '1<<31'. That is common practice.
2016-12-21 18:19:59 +01:00
Daniel Marjamäki
87abe1174f
floatConversionOverflow: Avoid warnings when 255.5 is converted to unsigned char etc.
2016-12-10 23:14:40 +01:00
PKEuS
d665641a76
Refactorizations:
...
- use std::string::pop_back() and std::string::back()
- pass argument as const std::string&
- Moved iterator into for loop head
2016-12-05 14:50:01 +01:00
Stefan Weil
57b57428c2
Fix some typos in comments (found by codespell)
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2016-11-27 11:40:42 +01:00
Daniel Marjamäki
0b3751520b
Add a check for float conversion overflows
2016-11-22 22:37:13 +01:00
Daniel Marjamäki
4de5dc75aa
Fixed #7807 (false positive: (error) Signed integer overflow for expression 'int32_max-1'.)
2016-11-07 22:29:40 +01:00
Daniel Marjamäki
f280061ff8
signed int overflow: warn about intmax+1
2016-11-05 09:29:52 +01:00
Daniel Marjamäki
c24a4b9189
Removed enum mismatch checker. Ticket #6960 .
2016-05-29 18:00:37 +02:00
Daniel Marjamäki
613311cc57
Fixed #7493 (enumMismatch on Enum declaration)
2016-05-12 11:46:08 +02:00
Daniel Marjamäki
bf8471e109
Fixed #7491 (Questionable enumMismatch)
2016-05-11 15:33:59 +02:00
Daniel Marjamäki
fb5e6d8a7d
Fixed #6960 (New check: enum variable is assigned mismatching value)
2016-05-10 20:22:35 +02:00
Daniel Marjamäki
4269702755
Fixed #7266 (False positive shiftTooManyBits with macros)
2016-01-10 20:44:52 +01:00
Alexander Mai
1d3e39df7e
Adjust message text for signConversion for constant negative epxressions
2016-01-02 22:56:15 +01:00
Lauri Nurmi
996c9244d8
Update copyright year to 2007-2016.
2016-01-01 15:34:45 +02:00
Daniel Marjamäki
9f6890512c
Refactoring CheckType checkers. Use ValueType.
2015-12-31 12:05:23 +01:00
Daniel Marjamäki
0f9d90d2be
Changed Copyrights. Removed my name.
2015-11-18 20:04:50 +01:00
Simon Martin
0009ceee59
Ticket #6793 : Added basic unit test showing that basic integer shift length check is run even for templates.
2015-08-02 00:03:09 +02:00
Daniel Marjamäki
4bde4d5a4a
updated style messages
2015-06-01 21:22:47 +02:00
amai2012
729b240d9c
Refactoring (compiler warnings and a typo)
2015-05-25 23:15:59 +02:00
Daniel Marjamäki
a8d7897471
Fixed travis failure
2015-05-25 18:19:40 +02:00
Daniel Marjamäki
c0b33d2fef
Fixed #6707 (new check: possible truncation when assigning int result to long)
2015-05-25 10:02:17 +02:00
PKEuS
bc5132e0ac
Refactorization: Moved declaration of errout, ... to testsuite.h, uniformized style
2015-03-11 22:54:43 +01:00
Daniel Marjamäki
ff11ba9847
Updated copyright year to 2015
2015-01-03 12:14:58 +01:00
Daniel Marjamäki
051d42ae6b
astyle formatting
2014-11-20 14:20:09 +01:00