Skip to content

Commit c7b9260

Browse files
jhlegarretajcfr
authored andcommitted
COMP: Fix unused parameter warnings in vtkParallelTransportTest1.cxx
Fix unused parameter warnings in `vtkParallelTransportTest1.cxx`: - Remove the unused `lineDirection` variable. - Make use of the `tangentsArray` variable by querying its contents using the index and print them. Fixes: ``` /usr/src/Slicer-build/vtkAddon/Testing/vtkParallelTransportTest1.cxx: In function ‘int vtkParallelTransportTest1(int, char**)’: /usr/src/Slicer-build/vtkAddon/Testing/vtkParallelTransportTest1.cxx:100:21: warning: unused variable ‘tangentsArray’ [-Wunused-variable] vtkDoubleArray* tangentsArray = vtkDoubleArray::SafeDownCast(pointData->GetArray("Tangents")); ^~~~~~~~~~~~~ /usr/src/Slicer-build/vtkAddon/Testing/vtkParallelTransportTest1.cxx:38:10: warning: unused variable ‘lineDirection’ [-Wunused-variable] double lineDirection[3] = { 0.0, 0.0, 1.0 }; ^~~~~~~~~~~~~ ``` https://github.com/Slicer/Slicer/actions/runs/6950843491/job/18911721210#step:4:2749
1 parent 84c1a4d commit c7b9260

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Testing/vtkParallelTransportTest1.cxx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ int vtkParallelTransportTest1(int vtkNotUsed(argc), char* vtkNotUsed(argv)[])
3535

3636
// Test computation with a straight line input (zero curvature)
3737

38-
double lineDirection[3] = { 0.0, 0.0, 1.0 };
3938
vtkNew<vtkLineSource> line;
4039
line->SetPoint1(10,20,30);
4140
line->SetPoint1(30,70,-80);
@@ -106,6 +105,8 @@ int vtkParallelTransportTest1(int vtkNotUsed(argc), char* vtkNotUsed(argv)[])
106105
normalsArray->GetTypedTuple(tupleIndex, normal);
107106
double binormal[3] = { 0.0, 0.0, 0.0 };
108107
binormalsArray->GetTypedTuple(tupleIndex, binormal);
108+
double tangents[3] = { 0.0, 0.0, 0.0 };
109+
tangentsArray->GetTypedTuple(tupleIndex, tangents);
109110

110111
double pointPosition[3];
111112
points->GetPoint(tupleIndex, pointPosition);
@@ -117,6 +118,7 @@ int vtkParallelTransportTest1(int vtkNotUsed(argc), char* vtkNotUsed(argv)[])
117118
std::cout << "Circle point [" << tupleIndex << "]" << std::endl;
118119
std::cout << " normal: " << normal[0] << ", " << normal[1] << ", " << normal[2] << std::endl;
119120
std::cout << " binormal: " << binormal[0] << ", " << binormal[1] << ", " << binormal[2] << std::endl;
121+
std::cout << " tangents: " << tangents[0] << ", " << tangents[1] << ", " << tangents[2] << std::endl;
120122
std::cout << " radial: " << radialDirection[0] << ", " << radialDirection[1] << ", " << radialDirection[2] << std::endl;
121123
}
122124

0 commit comments

Comments
 (0)