Expected absence of impact
An object (source) is expected to have no impact on another object (sink)
Description
You can specify that a pair of objects in your source code are not expected to impact each other. If you designate one object as a source and another as a sink, the Expected absence of impact check determines if the source actually has no impact on the sink. The check color is:
Green, if the source is proven to have no impact on the sink.
Orange, if there is a possible impact of the source on the sink but the impact cannot be proven. For instance, the impact might not occur on all execution paths.
The check is localized on an impact specification written in XML as follows:
<expect> <no-impact source="sourceID" sink="sinkID"/> </expect>
sourceID
and sinkID
are the ID-s of a source variable and a sink variable previously defined in the specification XML.If the check detects a possible impact between a source and a sink, the event list below the result shows one path from the source to the sink. You can click each event in the list to trace the path in the source code.
To see the result, you must set the following options:
Enable impact analysis using the option
Enable impact analysis (-impact-analysis)
.Specify the sources and sinks for impact analysis using the option
Specify sources and sinks (-impact-specifications)
.
Diagnosing This Check
Examples
Check Information
Group: Impact specification |
Language: C | C++ |
Acronym: EXPECTED_NO_IMPACT |