Find something wrong in this description?  Help us fix it! 
275 Black inov 8 CoralPurple Parkclaw Grey xWEWnw 275 Black inov 8 CoralPurple Parkclaw Grey xWEWnw 275 Black inov 8 CoralPurple Parkclaw Grey xWEWnw 275 Black inov 8 CoralPurple Parkclaw Grey xWEWnw 275 Black inov 8 CoralPurple Parkclaw Grey xWEWnw 275 Black inov 8 CoralPurple Parkclaw Grey xWEWnw

Why does PolySpace 5.1.1 (R2008a) show a red non-terminating loop (NTL) check in my code?

275 Black inov 8 CoralPurple Parkclaw Grey xWEWnw

My C code looks as follows. When I run a PolySpace verification, the "for" keyword that is mentioned in the comments is marked red with a message that the loop never terminates. Also, I get another red check for a underflow error. I am using the option "-detect-unsigned-overflows".

int main () {
    int intC;
    unsigned int uintA, uintB, i = 0;
    uintA = 20;
    uintB = 30;
    intC = 10;
    // The following keyword "for" is marked with
    // a red NTL check.
    for(i; i < 10; i++) {
      // Subtraction marked with a red UNFL check
      // for a possible underflow.
      if ((uintA - uintB) < uintC) { // UNFL: 20 - 30
        //...
      }
    }
}

Tags

No tags entered yet.

Black 8 Grey Parkclaw CoralPurple 275 inov
BlackSilver Jelly Fruit BlackPineapple OluKai BlackWhite Black Black Kulapa PavementPapaya BlackGuava Java W Candy Kai BlackCotton WoodDragon BlackNero BlackBubbly BlackDark Dark T4wTaOqp

1 Answer