![]() |
|
MISRA-C:2004 Rule 14.2: (Required) |
|
||||
![]() | |||||||
/* assume uint16_t x; and uint16_t i; */... x>=3u;/* not compliant: x is compared to 3, and the answer is discarded */
Note that 'null statement' and 'side effect' are defined in ISO/IEC 9899:1990 [2] sections 6.6.3 and 5.1.2.3 respectively.
QAC messages that encompass this guideline:
| 3110 | The left-hand operand of this ',' has no side effects. |
| 3112 | This statement has no side-effect - it can be removed. |
| 3425 | One branch of this conditional operation is a redundant expression. |
| 3426 | Right hand side of comma expression has no side effect and its value is not used. |
| 3427 | Right hand side of logical operator has no side effect and its value is not used. |
|
||
(c) The Motor Industry Research Association, 2004
|
QA C Source Code Analyser 8.1.2
MISRA-C:2004 Compliance Module 3.2 © 2013 Programming Research www.programmingresearch.com |
Personality Groups | Glossary | Message Index | MISRA-C:2004 Rule Index | Contents |