JavaScript is not currently enabled, but is required for full CodeSonar manual search and browse functionality.
If you are viewing this file in your hub's Web GUI, enable JavaScript in your browser: you will also need it for GUI functionality.
If you opened this file directly from disk, your browser may be directly suppressing JavaScript functionality: certain browsers perform this suppression on local files (but not files delivered by web servers) for security reasons.
| CodeSonar® 9.2p0 | CONFIDENTIAL | CodeSecure Inc |
The value returned by some function has not been used.
| Class Name | Ignored Return Value | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Significance | reliability | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Mnemonic | LANG.FUNCS.IRV | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Categories |
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Availability | Available for C and C++. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Enabling | Checks for this warning class are enabled by
default. To disable them, add the following WARNING_FILTER rule to the
project configuration file.
WARNING_FILTER += discard class="Ignored Return Value" |
#include <stdio.h>
int lang_funcs_irv(FILE *f){
feof(f); /* 'Ignored Return Value' warning issued here
* - factory settings include
* RETURN_CHECKER_BUILT_IN_CHECKED_PURE_FUNCS += ^feof$
*/
/* ... remainder of function (for example, operations on f) */
return 0;
}
For all procedures, CodeSonar uses a statistical analysis to determine whether the return value can be ignored. The sensitivity of this analysis is controlled by the RETURN_CHECKER_RATIO and RETURN_CHECKER_CONFIDENCE parameters.
If you want to suppress warnings for some function fname() that is specified in factory settings for RETURN_CHECKER_BUILT_IN_CHECKED_FUNCS or RETURN_CHECKER_BUILT_IN_CHECKED_PURE_FUNCS while still preserving those factory settings in your configuration file, add the following rule to your configuration file.
RETURN_CHECKER_IGNORED_FUNCS+= ^fname$
The general template configuration file contains factory settings enforcing checks for many functions with important return values, and permitting return values to be ignored for several more. For full lists, see the "Factory Settings" in the documentation for each parameter.
For warnings issued due to ignoring the return value of a function specified by one of the parameters that enforce checking, the warning instance score will depend in part on which parameter was used. All else being equal, the ordering is:
The following configuration file parameters affect checks for this warning class.
To report problems with this documentation, please visit https://support.codesecure.com/.