From: Eric S. Raymond Date: Wed, 29 Mar 2023 22:16:43 +0000 (-0400) Subject: Coverage exclusions for -d. X-Git-Tag: 1.15~27 X-Git-Url: https://jxself.org/git/?a=commitdiff_plain;h=77ac2f157045d04e44a068f3790cbfbdf0c0ef15;p=open-adventure.git Coverage exclusions for -d. --- diff --git a/main.c b/main.c index ab23ad9..d4539b1 100644 --- a/main.c +++ b/main.c @@ -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) diff --git a/misc.c b/misc.c index 34d045c..c2512cb 100644 --- a/misc.c +++ b/misc.c @@ -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; }