From eaf65f1d9d8921fc0a7b75fb4ef9ee48c3d9a595 Mon Sep 17 00:00:00 2001 From: Dan Buch Date: Sat, 16 Apr 2016 23:33:44 -0400 Subject: [PATCH] Get rid of compiler warnings for runtests --- lcthw-remnants-2/c-skeleton/tests/runtests.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lcthw-remnants-2/c-skeleton/tests/runtests.c b/lcthw-remnants-2/c-skeleton/tests/runtests.c index 82068ae..9e39d3a 100644 --- a/lcthw-remnants-2/c-skeleton/tests/runtests.c +++ b/lcthw-remnants-2/c-skeleton/tests/runtests.c @@ -20,7 +20,7 @@ int run_tests_file(char *filename) return -1; } -int main(int argc, char *argv[]) +int main(void) { int entcount = 0; int rc = 0; @@ -72,7 +72,7 @@ int main(int argc, char *argv[]) printf("ERROR in test %s: here's tests/tests.log\n", filename); printf("------\n"); - system("tail tests/tests.log"); + rc = system("tail tests/tests.log"); goto error; } @@ -90,5 +90,5 @@ error: free(namelist); } - return 1; + return rc != 0 ? rc : 1; }