indent(1): add some comments to quiet down Coverity.

Hopefully adding comments should help explain the code to both static
checkers and humans.

CID:	976543, 976544, 976545
Obtained from:	Piotr Stephaniak
This commit is contained in:
pfg 2016-08-23 01:58:02 +00:00
parent bfbdc169e5
commit 2ed5d5ce28
2 changed files with 3 additions and 1 deletions

View File

@ -200,6 +200,7 @@ dump_line(void)
break;
case '\\':
putc('\\', output);
/* add a backslash to escape the '\' */
default:
putc(*follow, output);
}

View File

@ -95,6 +95,7 @@ parse(int tk) /* tk: the code for the construct scanned */
case ifstmt: /* scanned if (...) */
if (ps.p_stack[ps.tos] == elsehead && ps.else_if) /* "else if ..." */
ps.i_l_follow = ps.il[ps.tos];
/* the rest is the same as for dolit and forstmt */
case dolit: /* 'do' */
case forstmt: /* for (...) */
ps.p_stack[++ps.tos] = tk;
@ -301,7 +302,7 @@ reduce(void)
case swstmt:
/* <switch> <stmt> */
case_ind = ps.cstk[ps.tos - 1];
/* FALLTHROUGH */
case decl: /* finish of a declaration */
case elsehead:
/* <<if> <stmt> else> <stmt> */