1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-07 09:20:11 +00:00

Quiesce warnings -Wdangling-else

Thanks to jilles for some reviews and tips.
This commit is contained in:
Sean Bruno 2013-10-28 18:10:35 +00:00
parent da276a9179
commit b51b786d73
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=257263
3 changed files with 15 additions and 11 deletions

View File

@ -2789,18 +2789,19 @@ void process_input_stack()
case token::TOKEN_TRANSPARENT:
{
if (bol) {
if (possibly_handle_first_page_transition())
if (possibly_handle_first_page_transition()) {
;
else {
} else {
int cc;
do {
node *n;
cc = get_copy(&n);
if (cc != EOF)
if (cc != EOF) {
if (cc != '\0')
curdiv->transparent_output(transparent_translate(cc));
else
curdiv->transparent_output(n);
}
} while (cc != '\n' && cc != EOF);
if (cc == EOF)
curdiv->transparent_output('\n');
@ -2811,9 +2812,9 @@ void process_input_stack()
case token::TOKEN_NEWLINE:
{
if (bol && !old_have_input
&& !curenv->get_prev_line_interrupted())
&& !curenv->get_prev_line_interrupted()) {
trapping_blank_line();
else {
} else {
curenv->newline();
bol = 1;
}

View File

@ -482,21 +482,24 @@ void mtsm::flush(FILE *fp, statem *s, string tag_list)
void statem::display_state()
{
fprintf(stderr, " <state ");
if (bool_values[MTSM_BR].is_known)
if (bool_values[MTSM_BR].is_known) {
if (bool_values[MTSM_BR].value)
fprintf(stderr, "[br]");
else
fprintf(stderr, "[!br]");
if (bool_values[MTSM_EOL].is_known)
}
if (bool_values[MTSM_EOL].is_known) {
if (bool_values[MTSM_EOL].value)
fprintf(stderr, "[eol]");
else
fprintf(stderr, "[!eol]");
if (int_values[MTSM_SP].is_known)
}
if (int_values[MTSM_SP].is_known) {
if (int_values[MTSM_SP].value)
fprintf(stderr, "[sp %d]", int_values[MTSM_SP].value);
else
fprintf(stderr, "[!sp]");
}
fprintf(stderr, ">");
fflush(stderr);
}

View File

@ -4600,14 +4600,14 @@ void hline_node::tprint(troff_output_file *out)
}
else {
hunits rem = x - w*i;
if (rem > H0)
if (rem > H0) {
if (n->overlaps_horizontally()) {
if (out->is_on())
n->tprint(out);
out->right(rem - w);
}
else
} else
out->right(rem);
}
while (--i >= 0)
if (out->is_on())
n->tprint(out);