scummvm/scummvm — comment on commit 538d83408091e9077f451f45c1ac1127f302b47d
File: engines/sky/logic.cpp line 1425
By eriktorbjorn:

Funny, I was just scratching my head over that same warning message. As far as I can tell, it's a false positive, but I also don't quite understand the code. As far as I can tell, the basic structure is currently this:

do {
restartScript = false;
// Some initialisations and stuff, non of which changes the value of restartScript.
while (!restartScript) {
// Script decoding. The only way it uses to get out of it is to return, or to set restartScript to true.
}
// At this point, restartScript should always be true, then.
} while (restartScript);

I.e. the outer loop looks like an infinite loop to me, which I believe is as it should be. But it seems like a slightly odd way of phrasing it.