Skip to content

Commit 8d379ba

Browse files
committed
COMP: Value-initialize points in SubdivisionQuadEdgeMesh regression test
GCC -Wmaybe-uninitialized reports the FixedArray storage of the ipt/opt points as possibly used uninitialized: they are filled by GetPoint() through a pointer the optimizer cannot prove writes every element. Value-initialize the points at declaration so their storage is defined before GetPoint() overwrites it.
1 parent df7ee28 commit 8d379ba

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Modules/Filtering/SubdivisionQuadEdgeMeshFilter/test/itkSubdivisionQuadEdgeMeshFilterRegressionTest.cxx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,8 +166,8 @@ itkSubdivisionQuadEdgeMeshFilterRegressionTest(int, char *[])
166166
unsigned int nMoved = 0;
167167
for (MeshType::PointIdentifier pid = 0; pid < 4; ++pid)
168168
{
169-
MeshType::PointType ipt;
170-
MeshType::PointType opt;
169+
MeshType::PointType ipt{};
170+
MeshType::PointType opt{};
171171
mesh->GetPoint(pid, &ipt);
172172
out->GetPoint(pid, &opt);
173173
if (PointMoved(ipt, opt))

0 commit comments

Comments
 (0)