![]() |
![]() |
2961 | ![]() |
||||
![]() | |||||||
| Unset data | |||||||
A definite anomaly has been detected. Examination of the context indicates that this object will always be uninitialized at this point and so its value will be undefined. This message will only be generated for automatic objects. Objects with static storage duration are initialized to zero by default. For example:
/*PRQA S 2017,2983,2986,3120,3199,3203,3321,3408 ++*/
void foo(void)
{
int i; /* 3196 */
int j;
j = i + 2; /* 2961 */
}
MISRA-C:2004 Rules applicable to message 2961:
| Rule 9.1 (Required) | All automatic variables shall have been assigned a value before being used. |
See also:
![]() | ||
| QA·C Source Code Analyser 8.1
MISRA-C:2004 Compliance Module 3.2 © 2012 Programming Research. www.programmingresearch.com | Personality Groups | Glossary | Message Index | MISRA-C:2004 Rule Index | Contents |