MATLAB: Some of the code displayed as red in analysis level 1 is displayed as orange in level 2 when using PolySpace Client for C/C++ 6.0 (R2008b)

Polyspace Client for C/C++

When analyzing my C code with PolySpace 6.0, in level 2, there is less code reported in red than in level 1. Some of the red checks become orange.

Best Answer

Number of red checks can change between level 1 and level 2 because of the different analysis methods used within those levels.
Level 1 does not take care of inter-procedural analysis, while level 2 does. So it is possible that level 1 detects an error while level 2 is not sure that this part of the code is used so the color can become orange.
This code could also become grey if level 2 analysis is sure it is not called. Having this kind of color change should result in the detection of two different errors.