Commit ID: 1005E828EA2303D8E68
CVSROOT: /cvs
Module name: src
Changes by: [email protected] 2020/03/31 00:30:06 UTC
Modified files:
bin/mksh : syn.c
Log message:
restructure; Coverity Scan doesn’t handle this:
goto into_the_loop;
while (/* CONSTCOND */ 1) {
bool foo;
if (somecond) {
into_the_loop:
foo = true;
bar = 1;
} else
bar = 2;
/* … */
if (foo) { // ←
/* … */
foo = false;
}
/* … */
}
The marked line throws an uninitialised variable tag :/
Solution: use goto;
To generate a diff of this changeset, execute the following commands:
cvs -R rdiff -kk -upr1.127 -r1.128 src/bin/mksh/syn.c