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

Williams, Norman K norman-k-williams at uiowa.edu
Mon Aug 15 11:25:09 EDT 2011


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.
________________________________


More information about the Insight-developers mailing list