Browse Source

configurator: warnings count as failures too.

Unfortunately, gcc only warns if it sees an unknown attribute (in this case, gcc 4.1 vs "cold").
Rusty Russell 15 years ago
parent
commit
2cae94deee
1 changed files with 3 additions and 2 deletions
  1. 3 2
      tools/configurator/configurator.c

+ 3 - 2
tools/configurator/configurator.c

@@ -267,9 +267,10 @@ static bool run_test(const char *cmd, struct test *test)
 		if (system("cat " INPUT_FILE) == -1);
 		if (system("cat " INPUT_FILE) == -1);
 
 
 	output = run(cmd, &status);
 	output = run(cmd, &status);
-	if (status != 0) {
+	if (status != 0 || strstr(output, "warning")) {
 		if (verbose)
 		if (verbose)
-			printf("Compile fail for %s, status %i: %s\n",
+			printf("Compile %s for %s, status %i: %s\n",
+			       status ? "fail" : "warning",
 			       test->name, status, output);
 			       test->name, status, output);
 		if (test->style == EXECUTE)
 		if (test->style == EXECUTE)
 			errx(1, "Test for %s did not compile:\n%s",
 			errx(1, "Test for %s did not compile:\n%s",