How to exclude preprocessed codes in Polyspace Code Prover
8 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
MathWorks Support Team
il 16 Set 2020
Modificato: MathWorks Support Team
il 16 Set 2020
I would like to know if there is an option to exclude preprocessed codes. When analyzing C code with Polyspace, the code that is excluded from compilation as a preprocessing macro is also analyzed and counted as the analysis result.
Risposta accettata
MathWorks Support Team
il 16 Set 2020
Modificato: MathWorks Support Team
il 16 Set 2020
Polyspace Code Prover does not analyze preprocessed code as below. It is displayed in gray color, but there is a difference between the light (excluded)/dark (actual Gray result) color of the gray color.
Here is an example code to show two kinds of grey color: light grey when the code is not processed, and dark grey when the code is processed but unreachable.
int f(void) {
int x=0;
#ifdef DEF
x++; // not processed (light grey)
#endif
if (0 == 1)
x++; // processed and unreachable because the if condition is always false
return x;
}
You can see more description of colors used in Polyspace Code Prover at the following documentation:
- Code Prover Result and Source Code Colors
0 Commenti
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Run Settings in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!