mirror of
https://git.rtems.org/rtems-tools/
synced 2025-06-15 10:29:18 +08:00
ReportsBase.cc: Remove possible division by zero
CID 1503709: Division or modulo by float zero Closes #4415
This commit is contained in:
parent
b1ad7e2f6e
commit
ffbf313928
@ -482,9 +482,11 @@ void ReportsBase::WriteSummaryReport(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
percentage = (double) notExecuted;
|
if ( totalBytes == 0 ) {
|
||||||
percentage /= (double) totalBytes;
|
percentage = 0;
|
||||||
percentage *= 100.0;
|
} else {
|
||||||
|
percentage = 100.0 * (double) notExecuted / totalBytes;
|
||||||
|
}
|
||||||
|
|
||||||
percentageBranches = (double) (
|
percentageBranches = (double) (
|
||||||
SymbolsToAnalyze->getNumberBranchesAlwaysTaken(symbolSetName) +
|
SymbolsToAnalyze->getNumberBranchesAlwaysTaken(symbolSetName) +
|
||||||
|
Loading…
x
Reference in New Issue
Block a user