]> de.git.xonotic.org Git - xonotic/gmqcc.git/blobdiff - ast.c
Cleanups and make compile with clang again with no warnings.
[xonotic/gmqcc.git] / ast.c
diff --git a/ast.c b/ast.c
index 04e13b8e6d5f96eca84bdedb14b494776989ca3c..e544e48a24984edd9e6176bec0afe3297d84a324 100644 (file)
--- a/ast.c
+++ b/ast.c
@@ -1061,10 +1061,10 @@ const char* ast_function_label(ast_function *self, const char *prefix)
     from = self->labelbuf + sizeof(self->labelbuf)-1;
     *from-- = 0;
     do {
-        unsigned int digit = id % 10;
-        *from = digit + '0';
+        *from-- = (id%10) + '0';
         id /= 10;
     } while (id);
+    ++from;
     memcpy(from - len, prefix, len);
     return from - len;
 }
@@ -1085,7 +1085,6 @@ void _ast_codegen_output_type(ast_expression_common *self, ir_value *out)
 }
 
 #define codegen_output_type(a,o) (_ast_codegen_output_type(&((a)->expression),(o)))
-#define codegen_output_type_expr(a,o) (_ast_codegen_output_type(a,(o)))
 
 bool ast_value_codegen(ast_value *self, ast_function *func, bool lvalue, ir_value **out)
 {