mirror of
https://github.com/github/codeql.git
synced 2025-12-20 02:44:30 +01:00
C++: Update the ReturnValueIgnored.qhelp docs to match the code
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
<overview>
|
||||
<p>
|
||||
This rule finds calls to a function that ignore the return value. A function call is only marked
|
||||
as a violation if at least 80% of the total calls to that function check the return value. Not
|
||||
as a violation if at least 90% of the total calls to that function check the return value. Not
|
||||
checking a return value is a common source of defects from standard library functions like <code>malloc</code> or <code>fread</code>.
|
||||
These functions return the status information and the return values should always be checked
|
||||
to see if the operation succeeded before operating on any data modified or resources allocated by these functions.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* @name Return value of a function is ignored
|
||||
* @description A call to a function ignores its return value, but more than 80% of the total number of calls to the function check the return value. Check the return value of functions consistently, especially for functions like 'fread' or the 'scanf' functions that return the status of the operation.
|
||||
* @description A call to a function ignores its return value, but at least 90% of the total number of calls to the function check the return value. Check the return value of functions consistently, especially for functions like 'fread' or the 'scanf' functions that return the status of the operation.
|
||||
* @kind problem
|
||||
* @id cpp/return-value-ignored
|
||||
* @problem.severity recommendation
|
||||
|
||||
Reference in New Issue
Block a user