]> git.draconx.ca Git - rrace.git/commitdiff
tests: Add missing returns from test programs.
authorNick Bowler <nbowler@draconx.ca>
Tue, 24 Jan 2023 02:26:19 +0000 (21:26 -0500)
committerNick Bowler <nbowler@draconx.ca>
Wed, 25 Jan 2023 06:05:43 +0000 (01:05 -0500)
Failing to "return" from main is well-defined in C99, but older
implementations will have undefined results.  Easily solved.

t/boardbit.c
t/initboard.c

index 6ecb6c6b3ad85c2e4a4202aeeafc41dd00d123c1..678b728b39668ab1e0c31f465454a1d8912a33d3 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Test board mask calculation functions.
- * Copyright © 2022 Nick Bowler
+ * Copyright © 2022-2023 Nick Bowler
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -60,4 +60,6 @@ int main(void)
        show_patterns("above", board_above);
        putchar('\n');
        show_patterns("below", board_below);
+
+       return 0;
 }
index cf59a300050226006e5ceb4aabe87a0c3ca0286b..cd34803e2dd5c37a78055623007557112a907930 100644 (file)
@@ -76,4 +76,6 @@ int main(void)
                }
                putchar('\n');
        }
+
+       return 0;
 }