[Insight-developers] Chasing some ITK Bug tracker bugs -- silly 'defensive' coding == 100s of warnings.
Bradley Lowekamp
blowekamp at mail.nih.gov
Thu Oct 21 19:44:51 EDT 2010
Hello again,
I believe I bought this issue up at the TCON this week. These warning are on the dashboard here:
http://www.cdash.org/CDash/viewBuildError.php?type=1&buildid=755396
I presume these are the same ones.
If I recall the code there was also many large blocks of "#if 0" too. There is definitely room to some cleanup there. I'd suggest file a bug to track the issue, before you get started.
Brad
On Oct 21, 2010, at 4:39 PM, kent williams wrote:
> I'm compiling with the following gcc flags, to try and verify that ITK4 has
> no problems with word width in 64-bit compiles.
>
> CMAKE_CXX_FLAGS:STRING=-Wall -W -Wshadow -Wunused-variable
> -Wunused-parameter -Wunused-function -Wunused -Wno-system-headers
> -Wwrite-strings -fprofile-arcs -ftest-coverage -Wno-deprecated
> -Woverloaded-virtual
>
> But I ran into this construct that happens over and over again, and it kinda
> blows my mind:
>
> for(unsigned j = 0; j < something; j++)
> {
> assert(j >= 0);
> ... actual code ...
> }
>
> There are dozens and dozens of asserts in ITK that check to make unsigned
> integers don't have negative values.
>
> Can I start a topic on gerrit to take them out?
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Kitware offers ITK Training Courses, for more information visit:
> http://kitware.com/products/protraining.html
>
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.itk.org/mailman/listinfo/insight-developers
More information about the Insight-developers
mailing list