Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

COMP: Many compiler warnings #11

Closed
hjmjohnson opened this issue Sep 8, 2021 · 1 comment · Fixed by #14
Closed

COMP: Many compiler warnings #11

hjmjohnson opened this issue Sep 8, 2021 · 1 comment · Fixed by #14
Assignees

Comments

@hjmjohnson
Copy link
Member

hjmjohnson commented Sep 8, 2021

[277/278] Building CXX object Modules/Remote/GrowCut/test/CMakeFiles/GrowCutTestDriver.dir/itkFastGrowCutTest.cxx.o
In file included from /Users/johnsonhj/Dashboard/src/ITK/Modules/Remote/GrowCut/test/itkFastGrowCutTest.cxx:19:
In file included from /Users/johnsonhj/Dashboard/src/ITK/Modules/Remote/GrowCut/include/itkFastGrowCut.h:197:
/Users/johnsonhj/Dashboard/src/ITK/Modules/Remote/GrowCut/include/itkFastGrowCut.hxx:99:17: warning: declaration shadows a field of 'FastGrowCut<TInputImage, TLabelImage, TMaskImage>' [-Wshadow]
  NodeIndexType m_DimX = region.GetSize(0);
                ^
/Users/johnsonhj/Dashboard/src/ITK/Modules/Remote/GrowCut/include/itkFastGrowCut.h:181:17: note: previous declaration is here
  NodeIndexType m_DimX;
                ^
In file included from /Users/johnsonhj/Dashboard/src/ITK/Modules/Remote/GrowCut/test/itkFastGrowCutTest.cxx:19:
In file included from /Users/johnsonhj/Dashboard/src/ITK/Modules/Remote/GrowCut/include/itkFastGrowCut.h:197:
/Users/johnsonhj/Dashboard/src/ITK/Modules/Remote/GrowCut/include/itkFastGrowCut.hxx:100:17: warning: declaration shadows a field of 'FastGrowCut<TInputImage, TLabelImage, TMaskImage>' [-Wshadow]
  NodeIndexType m_DimY = region.GetSize(1);
                ^
/Users/johnsonhj/Dashboard/src/ITK/Modules/Remote/GrowCut/include/itkFastGrowCut.h:182:17: note: previous declaration is here
  NodeIndexType m_DimY;
                ^
In file included from /Users/johnsonhj/Dashboard/src/ITK/Modules/Remote/GrowCut/test/itkFastGrowCutTest.cxx:19:
In file included from /Users/johnsonhj/Dashboard/src/ITK/Modules/Remote/GrowCut/include/itkFastGrowCut.h:197:
/Users/johnsonhj/Dashboard/src/ITK/Modules/Remote/GrowCut/include/itkFastGrowCut.hxx:101:17: warning: declaration shadows a field of 'FastGrowCut<TInputImage, TLabelImage, TMaskImage>' [-Wshadow]
  NodeIndexType m_DimZ = region.GetSize(2);
                ^
/Users/johnsonhj/Dashboard/src/ITK/Modules/Remote/GrowCut/include/itkFastGrowCut.h:183:17: note: previous declaration is here
  NodeIndexType m_DimZ;
                ^
In file included from /Users/johnsonhj/Dashboard/src/ITK/Modules/Remote/GrowCut/test/itkFastGrowCutTest.cxx:19:
In file included from /Users/johnsonhj/Dashboard/src/ITK/Modules/Remote/GrowCut/include/itkFastGrowCut.h:197:
/Users/johnsonhj/Dashboard/src/ITK/Modules/Remote/GrowCut/include/itkFastGrowCut.hxx:295:24: warning: declaration shadows a local variable [-Wshadow]
    LabelPixelType *   resultLabelVolumePtr = resultLabelVolume->GetBufferPointer();
                       ^
/Users/johnsonhj/Dashboard/src/ITK/Modules/Remote/GrowCut/include/itkFastGrowCut.hxx:288:30: note: previous declaration is here
  LabelPixelType *           resultLabelVolumePtr = resultLabelVolume->GetBufferPointer();
                             ^
/Users/johnsonhj/Dashboard/src/ITK/Modules/Remote/GrowCut/include/itkFastGrowCut.hxx:382:16: warning: unused variable 'compareTolerance' [-Wunused-variable]
  const double compareTolerance = (spacing[0] + spacing[1] + spacing[2]) / 3.0 * 0.01;
               ^
/Users/johnsonhj/Dashboard/src/ITK/Modules/Remote/GrowCut/include/itkFastGrowCut.hxx:377:14: warning: unused variable 'seedImage' [-Wunused-variable]
  auto       seedImage = this->GetSeedImage();
             ^
/Users/johnsonhj/Dashboard/src/ITK/Modules/Remote/GrowCut/include/itkFastGrowCut.h:69:15: note: in instantiation of member function 'itk::FastGrowCut<itk::Image<short, 3>, itk::Image<unsigned char, 3>, itk::Image<unsigned char, 3> >::GenerateData' requested here
  itkNewMacro(Self);
              ^
/Users/johnsonhj/Dashboard/src/ITK/Modules/Remote/GrowCut/test/itkFastGrowCutTest.cxx:78:41: note: in instantiation of member function 'itk::FastGrowCut<itk::Image<short, 3>, itk::Image<unsigned char, 3>, itk::Image<unsigned char, 3> >::New' requested here
  FGCType::Pointer fgcFilter = FGCType::New();
                                        ^
6 warnings generated.
[278/278] Linking CXX executable bin/GrowCutTestDriver
@dzenanz dzenanz self-assigned this Sep 8, 2021
@dzenanz
Copy link
Member

dzenanz commented Oct 29, 2021

This code is in need of cleanup. That is on a TODO list.

What compiler did you use to get these warnings? I don't get them on either VS2019 or GCC9.3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants