[Insight-developers] Annoying Deprecation Warnings
Bill Lorensen
bill.lorensen at gmail.com
Wed Dec 19 16:37:27 EST 2007
Folks,
Last spring we were able to eliminate all warnings on the itk dashboard. A
while back we deprecated the ComputeG method in several transforms. There
are a few problems with this:
1) Unfortunately, the method we used causes warnings on the dashboards even
though the methods are not used.
2) The gnu compilers give misleading warnings:
*/.../Insight/Code/Common/itkElasticBodyReciprocalSplineKernelTransform.txx:29:
warning: `
* m_Alpha' is deprecated (declared at
/.../Insight/Code/Common/itkElasticBodyReciprocalSplineKernelTransform.h
:114)
/.../Insight/Code/Common/itkElasticBodyReciprocalSplineKernelTransform.txx: In
member function `virtual void
itk::ElasticBodyReciprocalSplineKernelTransform<TScalarType,
m_Alpha IS NOT deprecated.
3) The large number of warnings is no doubt camouflaging other warnings.
Currently we limit the warning count to 50. Several dashboards reach this
limit.
4) Yes, these warnings can be turned off with CMake options, but they are on
by default.
I propose that we remove the deprecation macros and add a warning macro that
explicitly tells the user what to do.
Something like:
itkWarningMacro( << "This method has been deprecated as of ITK 3.6. Please
use the method: void ComputeG(vector,gmatrix) instead.");
The deprecated method declaration and implementation would still be
surrounded by
#if !defined(ITK_LEGACY_REMOVE)
#endif
If others agree, I'll be happy to edit the offending files.
For those of you who have read "The Tipping Point", I believe that warnings
are the subway graffiti of open source projects.
http://www.wikisummaries.org/The_Tipping_Point
http://www.wikisummaries.org/The_Tipping_Point#Chapter_4:_The_Power_of_Context_.28Part_One.29:_Bernie_Goetz_and_the_Rise_and_Fall_of_New_York
Bill
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.itk.org/mailman/private/insight-developers/attachments/20071219/40bf8fe5/attachment.html
More information about the Insight-developers
mailing list