Coverage exclusions for -d.
authorEric S. Raymond <esr@thyrsus.com>
Wed, 29 Mar 2023 22:16:43 +0000 (18:16 -0400)
committerEric S. Raymond <esr@thyrsus.com>
Wed, 29 Mar 2023 22:16:43 +0000 (18:16 -0400)
main.c
misc.c

diff --git a/main.c b/main.c
index ab23ad99ed223646471fb1dcc021d4ac9f8a5da5..d4539b19f1dc4f87ad035e5c4ac5ebb4774e8c4c 100644 (file)
--- 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 34d045c64ab37c1430f339c7bdf4e5cf656606e2..c2512cb0ac5a5b78493142f966ed9b653a94d9be 100644 (file)
--- 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;
 }