]> de.git.xonotic.org Git - xonotic/gmqcc.git/commitdiff
Fix unused parameters in ast.c
authorWolfgang (Blub) Bumiller <blub@speed.at>
Thu, 22 Nov 2012 20:39:30 +0000 (21:39 +0100)
committerWolfgang (Blub) Bumiller <blub@speed.at>
Thu, 22 Nov 2012 20:39:30 +0000 (21:39 +0100)
ast.c

diff --git a/ast.c b/ast.c
index 716ba1ac4a51f031a94839c13952bbc620480de6..040d352824c4c6501e8bd701816553e3f4be904e 100644 (file)
--- a/ast.c
+++ b/ast.c
@@ -47,6 +47,7 @@ static void asterror(lex_ctx ctx, const char *msg, ...)
 /* It must not be possible to get here. */
 static GMQCC_NORETURN void _ast_node_destroy(ast_node *self)
 {
+    (void)self;
     con_err("ast node missing destroy()\n");
     abort();
 }
@@ -966,6 +967,8 @@ const char* ast_function_label(ast_function *self, const char *prefix)
 
 bool ast_value_codegen(ast_value *self, ast_function *func, bool lvalue, ir_value **out)
 {
+    (void)func;
+    (void)lvalue;
     /* NOTE: This is the codegen for a variable used in an expression.
      * It is not the codegen to generate the value. For this purpose,
      * ast_local_codegen and ast_global_codegen are to be used before this
@@ -1290,6 +1293,8 @@ bool ast_function_codegen(ast_function *self, ir_builder *ir)
     ast_expression_common *ec;
     size_t    i;
 
+    (void)ir;
+
     irf = self->ir_func;
     if (!irf) {
         asterror(ast_ctx(self), "ast_function's related ast_value was not generated yet");
@@ -1722,6 +1727,8 @@ bool ast_return_codegen(ast_return *self, ast_function *func, bool lvalue, ir_va
     ast_expression_codegen *cgen;
     ir_value *operand;
 
+    *out = NULL;
+
     /* In the context of a return operation, we don't actually return
      * anything...
      */
@@ -2336,6 +2343,8 @@ bool ast_breakcont_codegen(ast_breakcont *self, ast_function *func, bool lvalue,
 {
     ir_block *target;
 
+    *out = NULL;
+
     if (lvalue) {
         asterror(ast_ctx(self), "break/continue expression is not an l-value");
         return false;