Expected impact
An object (source) is expected to have an impact on another object (sink)
Description
You can specify that a pair of objects in your source code are expected to impact each other. If you designate one object as a source and another as a sink, the Expected impact check determines if the source actually impacts the sink. The check color is:
Red, 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> <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
Show impact analysis results only (-impact-analysis)
.
Diagnosing This Check
Examples
Check Information
Group: Impact specification |
Language: C | C++ |
Acronym: EXPECTED_IMPACT |