]> git.draconx.ca Git - dxcommon.git/commitdiff
tests: Add missing returns test programs.
authorNick Bowler <nbowler@draconx.ca>
Mon, 23 Jan 2023 04:14:16 +0000 (23:14 -0500)
committerNick Bowler <nbowler@draconx.ca>
Mon, 23 Jan 2023 04:14:16 +0000 (23:14 -0500)
Failing to "return" from main is well-defined in C99, but older
implementations will have undefined results.  Easily solved.

tests/scripts.at

index 70df38844813f9bdcf8f9a16935c0206ccc8bed1..6c90f5a425b69e0cd9f10905e110ef368d07e543 100644 (file)
@@ -169,6 +169,7 @@ int main(void)
     if (SOPT_STRING[i+1] != ':')
       putchar('\n');
   }
+  return 0;
 }
 ]])
 
@@ -257,6 +258,7 @@ int main(void)
     else
       printf("'%c'\n", o.val);
   }
+  return 0;
 }
 ]])
 
@@ -554,6 +556,7 @@ int main(void)
   for (i = 0; i < sizeof root / sizeof root[0]; i++) {
     printf("%d, %d\n", root[i].num, root[i].offset);
   }
+  return 0;
 }
 ]])