]> git.xonotic.org Git - xonotic/gmqcc.git/blobdiff - con.c
Copy over the array-count in ast_type_adopt/ast_type_copy
[xonotic/gmqcc.git] / con.c
diff --git a/con.c b/con.c
index f667e6db72fb1d31321b6eb88b6ad353d95fcdaf..1cd7b326d10956192bb16983f538ac6744c65767 100644 (file)
--- a/con.c
+++ b/con.c
@@ -379,22 +379,22 @@ void compile_error(lex_ctx ctx, const char *msg, ...)
 
 bool GMQCC_WARN compile_warning(lex_ctx ctx, int warntype, const char *fmt, ...)
 {
-       va_list ap;
-       int lvl = LVL_WARNING;
+    va_list ap;
+    int lvl = LVL_WARNING;
 
     if (!OPTS_WARN(warntype))
         return false;
 
     if (opts_werror) {
         ++compile_errors;
-           lvl = LVL_ERROR;
-       }
-       else
+        lvl = LVL_ERROR;
+    }
+    else
         ++compile_warnings;
 
-       va_start(ap, fmt);
-    con_vprintmsg(lvl, ctx.file, ctx.line, "warning", fmt, ap);
-       va_end(ap);
+    va_start(ap, fmt);
+    con_vprintmsg(lvl, ctx.file, ctx.line, (opts_werror ? "error" : "warning"), fmt, ap);
+    va_end(ap);
 
-       return opts_werror;
+    return opts_werror;
 }