Skip to content

Commit

Permalink
COMP: Fix method parameter bound mismatch warning in misc cell classes
Browse files Browse the repository at this point in the history
Fix method parameter bound mismatch warning in `itk::TriangleCell` and
`itk::TetrahedronCell`: do not specify the dimensionality of the array
in the implementation file so that it matches the method declaration,
and they match the `itk::CellInterface` superclass method declaration.

Fixes:
```
[CTest: warning matched]
Modules/Core/Common/include/itkTriangleCell.hxx:452:74:
warning: argument 'pcoord' of type 'CoordRepType[3]' with mismatched bound [-Warray-parameter]
                                               CoordRepType              pcoord[3],
                                                                         ^
[CTest: warning matched]
Modules/Core/Common/include/itkTriangleCell.h:130:32:
note: previously declared as 'CoordRepType[]' here
                   CoordRepType[],
                               ^
```

and
```
[CTest: warning matched]
Modules/Core/Common/include/itkTetrahedronCell.hxx:85:77:
warning: argument 'pcoord' of type 'CoordRepType[3]' with mismatched bound [-Warray-parameter]
                                                  CoordRepType              pcoord[3],
                                                                            ^
[CTest: warning matched]
Modules/Core/Common/include/itkTetrahedronCell.h:137:32:
note: previously declared as 'CoordRepType[]' here
                   CoordRepType[],
                               ^
```

raised, for example, in:
https://open.cdash.org/viewBuildError.php?type=1&buildid=8839489

Related to commit 2338bdc.
  • Loading branch information
jhlegarreta committed Jul 14, 2023
1 parent 2338bdc commit a66bc7d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Modules/Core/Common/include/itkTetrahedronCell.hxx
Expand Up @@ -82,7 +82,7 @@ bool
TetrahedronCell<TCellInterface>::EvaluatePosition(CoordRepType * x,
PointsContainer * points,
CoordRepType * closestPoint,
CoordRepType pcoord[3],
CoordRepType pcoord[],
double * minDist2,
InterpolationWeightType * weights)
{
Expand Down
2 changes: 1 addition & 1 deletion Modules/Core/Common/include/itkTriangleCell.hxx
Expand Up @@ -449,7 +449,7 @@ bool
TriangleCell<TCellInterface>::EvaluatePosition(CoordRepType * x,
PointsContainer * points,
CoordRepType * closestPoint,
CoordRepType pcoord[3],
CoordRepType pcoord[],
double * minDist2,
InterpolationWeightType * weights)
{
Expand Down

0 comments on commit a66bc7d

Please sign in to comment.