Skip to content

Conversation

@jhlegarreta
Copy link
Contributor

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
@dzenanz
Copy link
Member

dzenanz commented Nov 20, 2025

@jcfr I guess we should merge this?

@jcfr jcfr merged commit 3afdbf9 into Slicer:main Nov 20, 2025
1 check passed
@jhlegarreta jhlegarreta deleted the FixUnusedParameterWarnings branch November 20, 2025 16:47
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.

3 participants