Non-terminating call
Called function does not return to calling context
Description
This check on a function call appears when the following conditions hold:
The called function does not return to its calling context. The call leads to a definite run-time error or a process termination function like
exit()
in the function body.There are other calls to the same function that do not lead to a definite error or process termination function in the function body.
When only a fraction of calls to a function lead to a definite error, this check helps identify those function calls. In the function body, even though a definite error occurs, the error appears in orange instead of red because the verification results in a function body are aggregated over all function calls. To indicate that a definite error has occurred, a red Non-terminating call check is shown on the function call instead.
Otherwise, if all the calls to a function lead to a definite error or process termination function in the function body, the Non-terminating call error is not displayed. The error appears in red in the function body and a dashed red underline appears on the function calls. However, following the function call, like other red errors, Polyspace® does not analyze the remaining code in the same scope as the function call.
You can navigate directly from the function call to the operation causing the run-time error in the function body.
To find the source of error, on the Source pane, place your cursor on the loop keyword and view the tooltip.
Navigate to the source of error in the function body. Right-click the function call and select Go to Cause if the option exists.
If the error is the result of multiple causes, the option takes you to the first cause in the function body. Multiple causes can occur, for instance, when some values of a function argument trigger one specific error and other values trigger other errors.
Diagnosing This Check
Examples
Check Information
Group: Control flow |
Language: C | C++ |
Acronym: NTC |