[Insight-developers] LabelObject::ConstIndexIterator compiler warnings?

Williams, Norman K norman-k-williams at uiowa.edu
Fri Jul 29 15:48:38 EDT 2011


I found this by adding -Wall -Wextra and doing an experimental build.


/.../ITK/Modules/Filtering/LabelMap/include/itkLabelMapToLabelImageFilter.h
xx:52: warning: 'it.itk::LabelObject<long unsigned int,
2u>::ConstIndexIterator::m_Index.itk::Index<2u>::m_Index[1u]' may be used
uninitialized in this function

there are 220 warnings that you get with those flags and they all seem to
stem from the curiously semi-un-ITK-ish class
LabelObject::ConstIndexIterator.


Leaving off for now the fact that it's a nested cast with a name
inconsistent with the rest of ITK...

It looks as though this warning is a false positive -- any time the index
might actually be used, it is also set to a resonable value.

But is it worth it to add code to initialize it? Or is there a free or low
computational cost way to restructure this class such that the warning
goes away?

--
Kent Williams norman-k-williams at uiowa.edu






________________________________
Notice: This UI Health Care e-mail (including attachments) is covered by the Electronic Communications Privacy Act, 18 U.S.C. 2510-2521, is confidential and may be legally privileged.  If you are not the intended recipient, you are hereby notified that any retention, dissemination, distribution, or copying of this communication is strictly prohibited.  Please reply to the sender that you have received the message in error, then delete it.  Thank you.
________________________________


More information about the Insight-developers mailing list