Instead of a case statement falling through, with a "FALLTHRU" comment,
to the follow case that just does a break, continue, goto, etc.,
control-flow statement, duplicate the statement in place of the comment.
Fall-through should be the exception, and saving a break statement
doesn't offset the cognitive cost when reading the source.
12 files changed:
strcpy (err, "extraneous semi-colon");
return NOTOK;
}
strcpy (err, "extraneous semi-colon");
return NOTOK;
}
case LX_COMA:
case LX_END:
return OK;
case LX_COMA:
case LX_END:
return OK;
case BODY:
lkfclosedata (fp, seqfile);
adios (NULL, "no blank lines are permitted in %s", seqfile);
case BODY:
lkfclosedata (fp, seqfile);
adios (NULL, "no blank lines are permitted in %s", seqfile);
case ':': /* comment */
case ';':
case '#':
case ':': /* comment */
case ';':
case '#':
fmt_addcomptext("body", rbuf);
}
fmt_addcomptext("body", rbuf);
}
trnflag = 0;
noisy++;
/* advise (cp, "unable to read"); already advised */
trnflag = 0;
noisy++;
/* advise (cp, "unable to read"); already advised */
case SCNERR:
case SCNNUM:
case SCNERR:
case SCNNUM:
trnflag = 0;
noisy++;
/* advise (cp, "unable to read"); already advised */
trnflag = 0;
noisy++;
/* advise (cp, "unable to read"); already advised */
case SCNERR:
case SCNNUM:
case SCNERR:
case SCNNUM:
case BODY:
fseek (in, (long) (-strlen (buf)), SEEK_CUR);
case BODY:
fseek (in, (long) (-strlen (buf)), SEEK_CUR);
case BODY:
adios (NULL, "no blank lines are permitted in %s", seqfile);
case BODY:
adios (NULL, "no blank lines are permitted in %s", seqfile);
case RP_NO:
case RP_NDEL:
die (NULL, "posting failed; %s", rp_string (retval));
case RP_NO:
case RP_NDEL:
die (NULL, "posting failed; %s", rp_string (retval));
default:
die (NULL, "unexpected response; %s", rp_string (retval));
default:
die (NULL, "unexpected response; %s", rp_string (retval));
if (strcmp (dp->d_name, ".") == 0
|| strcmp (dp->d_name, "..") == 0)
continue;
if (strcmp (dp->d_name, ".") == 0
|| strcmp (dp->d_name, "..") == 0)
continue;
state = BODY;
goto body;
}
state = BODY;
goto body;
}
case FILEEOF:
goto finished;
case FILEEOF:
goto finished;
default:
continue;
case ')':
default:
continue;
case ')':
inform("missing argument to %s", argp[-2]);
return;
}
inform("missing argument to %s", argp[-2]);
return;
}
case SNDRFSW:
continue;
}
case SNDRFSW:
continue;
}