]> git.xonotic.org Git - xonotic/gmqcc.git/blobdiff - parser.cpp
cleanup: silence fallthrough warnings
[xonotic/gmqcc.git] / parser.cpp
index ed5bde108bff5e2455a563bac41fb8db8b649e98..92434f00370aa16e1a346672de1d457699967a80 100644 (file)
@@ -728,6 +728,7 @@ static bool parser_sy_apply_operator(parser_t *parser, shunt *sy)
 
         case opid2('|','|'):
             generated_op += 1; /* INSTR_OR */
+            [[fallthrough]];
         case opid2('&','&'):
             generated_op += INSTR_AND;
             if (!(out = parser->m_fold.op(op, exprs))) {
@@ -857,10 +858,13 @@ static bool parser_sy_apply_operator(parser_t *parser, shunt *sy)
 
         case opid1('>'):
             generated_op += 1; /* INSTR_GT */
+            [[fallthrough]];
         case opid1('<'):
             generated_op += 1; /* INSTR_LT */
+            [[fallthrough]];
         case opid2('>', '='):
             generated_op += 1; /* INSTR_GE */
+            [[fallthrough]];
         case opid2('<', '='):
             generated_op += INSTR_LE;
             if (NotSameType(TYPE_FLOAT)) {
@@ -2630,6 +2634,7 @@ static bool parse_return(parser_t *parser, ast_block *block, ast_expression **ou
             retval = new ast_value(ctx, "#LOCAL_RETURN", TYPE_VOID);
             retval->adoptType(*expected->m_next);
             parser->function->m_return_value = retval;
+            parser->function->m_return_value->m_flags |= AST_FLAG_NOREF;
         }
 
         if (!exp->compareType(*retval)) {