MISRA Discussion Forums
0-1-2 Infeasible paths clarification - Printable Version

+- MISRA Discussion Forums (https://forum.misra.org.uk)
+-- Forum: MISRA C++ (https://forum.misra.org.uk/forumdisplay.php?fid=18)
+--- Forum: MISRA C++:2008 rules (https://forum.misra.org.uk/forumdisplay.php?fid=19)
+---- Forum: 6.0 Language independent issues (C++) (https://forum.misra.org.uk/forumdisplay.php?fid=129)
+---- Thread: 0-1-2 Infeasible paths clarification (/showthread.php?tid=1032)



0-1-2 Infeasible paths clarification - melinda.bradury - 06-03-2014

I have a pure virtual function like
virtual void OnEvent(EventName event, State& superState) = 0;

For some of the derived classes, the implementation uses both of the the parameters. For others, the parameters are not used at all.

Is this acceptable?


Re: 0-1-2 Infeasible paths clarification - misra cpp - 05-10-2015

We assume you meant to refer to 0-1-12 in your title?

If that is the case, then the usage you describe is compliant.