False positive candidate Rule 10.3 for float array zero-initialization
Show older comments
Hello,
Polyspace is raising the 10.3 MISRA violation for array initializations like the one below:
float data[3*3] = {0}
My question: is this the intended behavior of Polyspace? Shouldn't this type of zero-initialization be allowed?
My impression is that the MISRA 2012 standard allows this by exception. Other static analyzers do not raise a warning. Empty array-initialization makes the warning go away, so we may just do that.
Thanks.
Accepted Answer
More Answers (0)
Categories
Find more on Run Settings in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!