0029948: Uninitialized variable in GeomEvaluator_OffsetSurface::CalculateD0(...)...
authornbv <nbv@opencascade.com>
Wed, 11 Jul 2018 14:29:54 +0000 (17:29 +0300)
committerbugmaster <bugmaster@opencascade.com>
Fri, 13 Jul 2018 12:05:22 +0000 (15:05 +0300)
Variable "NStatus" from GeomEvaluator_OffsetSurface class is now initialized correctly.

src/GeomEvaluator/GeomEvaluator_OffsetSurface.cxx

index c41d9a7..6943c92 100644 (file)
@@ -466,7 +466,7 @@ void GeomEvaluator_OffsetSurface::CalculateD0(
       derivatives(MaxOrder, 1, theU, theV, myBaseAdaptor, 0, 0, AlongU, AlongV, L, DerNUV, DerSurf);
 
     gp_Dir Normal;
       derivatives(MaxOrder, 1, theU, theV, myBaseAdaptor, 0, 0, AlongU, AlongV, L, DerNUV, DerSurf);
 
     gp_Dir Normal;
-    CSLib_NormalStatus NStatus;
+    CSLib_NormalStatus NStatus = CSLib_Singular;
     CSLib::Normal(MaxOrder, DerNUV, the_D1MagTol, theU, theV, Umin, Umax, Vmin, Vmax,
                   NStatus, Normal, OrderU, OrderV);
     if (NStatus == CSLib_InfinityOfSolutions)
     CSLib::Normal(MaxOrder, DerNUV, the_D1MagTol, theU, theV, Umin, Umax, Vmin, Vmax,
                   NStatus, Normal, OrderU, OrderV);
     if (NStatus == CSLib_InfinityOfSolutions)