[Insight-developers] How do you deal with unused parameters vis a vis Doxygen?

Matt McCormick matt.mccormick at kitware.com
Mon Aug 15 11:34:14 EDT 2011


I ran into the same problem.  I believe the solution is 'itkNotUsed'
as in 'itkNotUsed(ptr)' defined in itkMacro.h.

Matt

On Mon, Aug 15, 2011 at 11:25 AM, Williams, Norman K
<norman-k-williams at uiowa.edu> wrote:
> I want to get rid of these warnings.  Here's the problem:
>
> /** assign solution member.
>  * \param ptr Pointer to the object of Solution class.
>  */
>  virtual void SetSolution(Solution::ConstPointer) { }
>
> It's a no-win situation: Either Doxygen will warn because it can't find
> the named parameter, or the compiler will complain (with -Wall -Wextra)
> because the named parameter is unused.
>
> I have a foggy memory of there being an ITK Macro for unused parameters,
> but Googling around didn't find anything. Anyone know what the
> 'ITK-Correct' thing to do is?
>
> I mean, aside from using
>
>  void SetSolution(Solution::ConstPointer ptr) = 0;
>
> which is the obvious thing to do here.
>
>
>
> I (or someone very like me) removed the parameter name from the argument
> list in the case where the argument isn't used.
>>
>>
>>        ITK/Modules/Numerics/FEM/include/itkFEMLoadBase.h:55: warning:
>>argument 'ptr' of command @param is not found in the argument list of
>>itk::fem::Load::SetSolution(Solution::ConstPointer)
>>
>>
>>        ITK/Modules/Numerics/FEM/include/itkFEMSolver.h:119: warning:
>>argument 'dt' of command @param is not found in the argument list of
>>itk::fem::Solver< VDimension >::SetTimeStep(Float)
>>
>>
>
>
>
> ________________________________
> 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.
> ________________________________
> _______________________________________________
> 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