[Development] Compiler warnings
Bo Thorsen
bo at vikingsoft.eu
Tue Oct 14 10:21:51 CEST 2014
Den 14-10-2014 08:59, Kurt Pattyn skrev:
> how do these applications comply with MISRA?
MISRA is impossible to comply with for a framework. For example,
consider the required rule 0-1-11: "There shall be no unused parameters
(named or unnamed) in non-virtual functions."
With this, void f(int /*no_longer_used*/) is illegal. For any
non-trivial framework that keeps binary compatibility, this will over
time be hit.
There are also cases where base classes get info to methods that
subclasses do not need.
Sure, I can do something that could fool an automatic code checker, but
that doesn't mean the rule is not violated.
This is just one example. MISRA is something you use for your own code,
if you feel the need to hurt or punish yourself.
Bo.
--
Viking Software
Qt and C++ developers for hire
http://www.vikingsoft.eu
More information about the Development
mailing list