1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-10-20 02:38:43 +00:00

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:
Pedro F. Giffuni 2016-08-23 01:58:02 +00:00
parent f3c23ec321
commit 16c2e36059
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=304651
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> */