Skip to content

Conversation

jhlegarreta
Copy link

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

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
@jcfr jcfr force-pushed the FixUnusedParameterWarnings branch from d980faf to c7b9260 Compare August 20, 2025 20:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant