Coverage exclusions for -d.

This commit is contained in:
Eric S. Raymond 2023-03-29 18:16:43 -04:00
parent ff46cf7fac
commit 77ac2f1570
2 changed files with 4 additions and 4 deletions

6
main.c
View file

@ -1275,9 +1275,9 @@ int main(int argc, char *argv[])
#endif
while ((ch = getopt(argc, argv, opts)) != EOF) {
switch (ch) {
case 'd':
settings.debug +=1;
break;
case 'd': // LCOV_EXCL_LINE
settings.debug +=1; // LCOV_EXCL_LINE
break; // LCOV_EXCL_LINE
case 'l':
settings.logfp = fopen(optarg, "w");
if (settings.logfp == NULL)

2
misc.c
View file

@ -719,7 +719,7 @@ static int32_t get_next_lcg_value(void)
int32_t old_x = game.lcg_x;
game.lcg_x = (LCG_A * game.lcg_x + LCG_C) % LCG_M;
if (settings.debug) {
printf("# random %d\n", old_x);
printf("# random %d\n", old_x); // LCOV_EXCL_LINE
}
return old_x;
}