ReportsBase.cc: Dereference after null check error spotted by Coverity
Original author: rlong
CID 1503710: Dereference after null check in WriteAnnotatedReport().
12. var_compare_op: Comparing info.uncoveredRanges to null implies that info.uncoveredRanges might be null.
13. Condition info.uncoveredBranches == NULL, taking false branch.
219 if ((info.uncoveredRanges == NULL) &&
220 (info.uncoveredBranches == NULL))
5. Continuing loop.
9. Continuing loop.
221 continue;
222
223 // If uncoveredRanges and uncoveredBranches are empty, then everything
224 // must have been covered for this symbol. Just skip it.
CID 1503710 (#1 of 1): Dereference after null check (FORWARD_NULL)14. var_deref_model: Passing null pointer info.uncoveredRanges->set to empty, which dereferences it. [show details]
225 if ((info.uncoveredRanges->set.empty()) &&
226 (info.uncoveredBranches->set.empty()))
227 continue;
Edited by Amar Takhar