False positive candidate Rule 10.3 for float array zero-initialization
Ältere Kommentare anzeigen
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.
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Run Settings finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!