Browse Source

Fix 'control may reach end of non-void function' warning

master
mtardy 4 years ago
parent
commit
cc069fcc92
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      parse.leg

+ 2
- 2
parse.leg View File

@ -1003,7 +1003,7 @@ oop addOperation(oop ast, oop lhs, oop rhs)
}
}
runtimeError("addition between two incompatible types");
assert(0); // to prevent: control may reach end of non-void function
return NULL; // to prevent: control may reach end of non-void function
}
oop mulOperation(oop ast, oop lhs, oop rhs)
@ -1020,7 +1020,7 @@ oop mulOperation(oop ast, oop lhs, oop rhs)
}
}
runtimeError("multiplication between two incompatible types");
assert(0);
return NULL; // to prevent: control may reach end of non-void function
}
#undef TYPESIG

Loading…
Cancel
Save