Commit Graph

20 Commits

Author SHA1 Message Date
Daniel Marjamäki 036c71d967 Fixed #5462 (non-void function does not return a value) 2021-07-04 11:27:57 +02:00
Georgy Komarov 80dee36e68
library: Add new warning: ignoredReturnErrorCode (#2877)
* library: Add optional "type" attribute to "use-retval"

Added an optional "type" attribute to "use-retval" nodes in the
configuration. When the return type of a function configured with
`<use-retval type="error-code"\>` node does not used, the new style
error "ignoredReturnErrorCode" will be generated.

* Fix and improve patch after the initial review

* Fixed severity level and [[nodiscard]] attribute

* Fix incorrect condition

* Remove redundant condition
2020-11-05 13:35:52 +01:00
Daniel Marjamäki 37245a8179 Update copyright year 2020-06-13 16:37:12 +02:00
Oliver Stöneberg 37bc0483a4
made check.h less heavy (#2633) 2020-05-23 07:16:49 +02:00
Daniel Marjamäki c57d3e069a Replace 'unsigned' with 'nonneg' in checkfunctions 2019-07-16 08:49:02 +02:00
Daniel Marjamäki 3dc34f1515 Disable all simplified checks 2019-03-16 09:17:50 +01:00
Daniel Marjamäki bd7790fd8c Update copyright year 2019-02-09 07:24:06 +01:00
Daniel Marjamäki 8b5f36670a Introduce macro OVERRIDE for gcc-4.6 compatibility. 2019-01-12 07:37:42 +01:00
rikardfalkeborn 613dc19b68 #4241: Check for address of single character passed as string (#1381)
* #4241: Check for address of single character passed as string

Add a check that address of a single character is not passed as argument
to argument marked as strings (using strz). The check does not warn if
the address of a character with known value '\0'.

Since ValueFlow currently does not handle global constants (see #7597),
do not warn if the variable is global to avoid FPs when the address of
a global variable assigned to '\0' is passed to a function expecting a
string.

Remove comment in docs saying strz is unused.

* Change asdf to Hello world

* Add test of address to first element in string

* Add error reporting function to getErrorMessages

* Fix strings in test
2018-10-14 18:49:34 +02:00
Daniel Marjamäki 45379a3aa6 Updated copyright year for modified files
[ci skip]
2018-06-10 22:07:21 +02:00
IOBYTE ce50df8047 Fix override warnings. (#1234) 2018-05-15 16:37:40 +02:00
Daniel Marjamäki c4caee6b18 Updated copyright year 2018-01-14 15:37:52 +01:00
Daniel Marjamäki 18adb97873 astyle formatting
[ci skip]
2017-05-28 15:56:26 +02:00
Ayaz Salikhov 28aa939d69 iwyu - include what you use 2017-05-27 04:33:47 +02:00
Daniel Marjamäki 101dc28afa Refactoring: Moved checkMemset.. from CheckOther to CheckFunctions 2017-04-23 07:53:41 +02:00
Daniel Marjamäki f8e9071de1 CheckFunction: In the <valid> check handle possible/conditional/inconclusive values better 2017-04-20 22:14:54 +02:00
amai2012 eba1b0881d Minor refactoring: use nullptr (instead of 0/NULL), change signature of Tokenizer::createTokens 2016-05-07 16:30:54 +02:00
Lauri Nurmi 996c9244d8 Update copyright year to 2007-2016. 2016-01-01 15:34:45 +02:00
PKEuS f516de8633 Moved a few checks from CheckOther to CheckFunctions 2015-11-22 13:49:10 +01:00
PKEuS 57d1196386 Replaced CheckNonReentrantFunctions and CheckObsoleteFunctions by generic CheckFunctions which is based on Library (#6529) 2015-11-22 09:18:07 +01:00