When the following code is analysed using Polyspace Client for C/C++ 5.1 (R2008a):
void foo(int a){int b;b = 1/(a-8);}void foo3(int a){int b;b = 1/(a-3);}void bar(void){int i;for(i=0;i<10;i++){foo(i);}}#if 1void baz(void){int i;for(i=0;i<10;i++){foo3(i);}}#endif
The checks generated are orange (instead of red) even though a divide by zero error (ZDV) is certain to occur in the above code.
Best Answer