Skip to content

Commit

Permalink
COMP: Fix array bound warning for typecast initial value
Browse files Browse the repository at this point in the history
In member function 'itk::QuadEdge::Self* itk::QuadEdge::GetSym()',
    inlined from 'itk::GeometricalQuadEdge<TVRef, TFRef, TPrimalData, TDualData, PrimalDual>::Self* itk::GeometricalQuadEdge<TVRef, TFRef, TPrimalData, TDualData, PrimalDual>::GetSym() [with TVRef = long unsigned int; TFRef = long unsigned int; TPrimalData = bool; TDualData = bool; bool PrimalDual = true]' at ITK/Modules/Core/QuadEdgeMesh/include/itkGeometricalQuadEdge.h:106:3,
    inlined from 'typename itk::QuadEdgeMeshEulerOperatorSplitEdgeFunction<TMesh, TQEType>::Superclass::OutputType itk::QuadEdgeMeshEulerOperatorSplitEdgeFunction<TMesh, TQEType>::Evaluate(QEType*) [with TMesh = itk::QuadEdgeMesh<double, 3>; TQEType = itk::GeometricalQuadEdge<long unsigned int, long unsigned int, bool, bool, true>]' at ITK/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshEulerOperatorSplitEdgeFunction.h:76:36,
    inlined from 'int itkQuadEdgeMeshEulerOperatorSplitEdgeTest(int, char**)' at ITK/Modules/Core/QuadEdgeMesh/test/itkQuadEdgeMeshEulerOperatorSplitEdgeTest.cxx:45:26:
ITK/Modules/Core/QuadEdgeMesh/include/itkQuadEdge.h:245:15: warning: array subscript 0 is outside array bounds of 'QEType [0]' [-Warray-bounds=]
  245 |     if (this->m_Rot)
      |         ~~~~~~^~~~~
  • Loading branch information
hjmjohnson committed Apr 30, 2024
1 parent d9fcaa0 commit 462a874
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ itkQuadEdgeMeshEulerOperatorSplitEdgeTest(int, char *[])
auto splitEdge = SplitEdge::New();
std::cout << " "
<< "Test No Mesh Input";
if (splitEdge->Evaluate((QEType *)1))
if (splitEdge->Evaluate((QEType *)0))
{
std::cout << "FAILED." << std::endl;
return EXIT_FAILURE;
Expand Down

0 comments on commit 462a874

Please sign in to comment.