mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 00:37:25 +01:00
[poincare] Avoid reading "garbage" value: result variable can be
read in the while condition without being set to an initial value (if the first ridderApproximation was undefined for instance) Found by clang-analyzer
This commit is contained in:
committed by
LeaNumworks
parent
d9b5acc70d
commit
5afdec00b8
@@ -50,7 +50,7 @@ Evaluation<T> DerivativeNode::templatedApproximate(ApproximationContext approxim
|
||||
}
|
||||
|
||||
T error = sizeof(T) == sizeof(double) ? DBL_MAX : FLT_MAX;
|
||||
T result;
|
||||
T result = 1.0;
|
||||
T h = k_minInitialRate;
|
||||
static T tenEpsilon = sizeof(T) == sizeof(double) ? 10.0*DBL_EPSILON : 10.0f*FLT_EPSILON;
|
||||
do {
|
||||
|
||||
Reference in New Issue
Block a user