cyclonedds
cyclonedds copied to clipboard
Fix part of MISRA rule 16-N.
This addresses rule 16-N.
All switch statements shall be well-formed.
This PR resolve only next violations.
- "Every switch statement shall have a default label"
Exclude switch throw
Enum
type.
- "An unconditional break statement shall terminate every switch-clause"
Exclude cases when we need to "Fall through". And cases when we using
goto label;
orreturn value
from switch-case (Because otherwise it's dead code!).
The next violation needs to be discussed.
- "The switch-clause following the default label shall, prior to the terminating break statement, contain either: comment, statement"