[splint-discuss] will the splint checks the boundary condition of for loop logic expression?

srinivas naga vutukuri srinivas.vutukuri at gmail.com
Mon Sep 3 03:57:45 PDT 2007


Hi,

    Am just trying out this small piece of code whether the splint can
check the for loop logic expression boundary check.

If you see, the following for loop leads into infinite loop condition.
When i tried +inf-loops Or +loop-exec Or +for-loop-exec,
i was't given any warnings...

Could the splint checks the following kind of areas?
I used splint - 3.1.1 version

-------snippet---------------------
/*@unused@*/
int f(void)
{
  int i;
  int j;


  for (i=0;i<2;)
    j = 2;


  return 0;
}
-------snippet--------------------


Best regards,
srinivas.


More information about the splint-discuss mailing list