[Insight-developers] Suggestion on correcting the following warning

Bradley Lowekamp blowekamp at mail.nih.gov
Fri Jul 8 12:20:12 EDT 2011


I see the following warning, I would like to fix:
http://www.cdash.org/CDash/viewBuildError.php?type=1&buildid=1313872

It comes from this little file which has an optional definition of a static variable:
http://itk.org/gitweb?p=ITK.git;a=blob;f=Modules/Core/Common/src/itk_hashtable.cxx;h=b53eed69e2313a8a63657bc77d6ffd7512deae93;hb=HEAD

So when it's not defined, the .o module has not symbols.

It would be good to correct the way we build so as not to build an "empty" file. The logic of when the variable is defined is rather complex and can't be determined by CMake and add source time.

Posible solutions are:
1) add another variable to the file that isn't used
2) moved the definition of the variable to another file ( which always has a symbol )
3) just suppress this warning, so I'll always seeing in my editor, and may result in me ignoring other warnings too. ( not my preferred option )

Any suggestions about the best solution?

Thanks,
Brad


More information about the Insight-developers mailing list