[splint-discuss] How to control infinite Loop?
Jon Wilson
jon.wilson at globalgraphics.com
Mon Nov 24 02:33:07 PST 2008
Le Huu Hoang Gia wrote:
> I write a code:
> void loop1(int x)
> {
> while (x < 3) x--;
> };
> Splint report no errors or warning.
> Is there any way to analize this code? I expected that splint would
> report a warning in this loop.
That loop will terminate just fine, when x wraps around and becomes
positive. Splint, I believe, will report simple infinite loops
with for (;;) or while (true) with no break or exit statements.
Jon
More information about the splint-discuss
mailing list