shithub: scc

Download patch

ref: 04b3480cb426c38028b895d6ab38cd108a9aefae
parent: 195cc1977d51217abaf20467714bc78c320221cd
author: Roberto E. Vargas Caballero <[email protected]>
date: Sun Jul 19 07:27:16 EDT 2015

Join conditions in warn_helper()

--- a/cc1/error.c
+++ b/cc1/error.c
@@ -17,16 +17,18 @@
 {
 	if (flag == 0)
 		return;
-	if (flag < 0)
-		failure = 1;
 	fprintf(stderr, "%s:%u: %s: ",
 	       input->fname, input->nline,
 	       (flag < 0) ? "error" : "warning");
 	vfprintf(stderr, fmt, va);
 	putc('\n', stderr);
-	if (flag < 0 && nerrors++ == MAXERRNUM) {
-		fputs("too many errors\n", stderr);
-		exit(1);
+
+	if (flag < 0) {
+		failure = 1;
+		if (nerrors++ == MAXERRNUM) {
+			fputs("too many errors\n", stderr);
+			exit(1);
+		}
 	}
 }