Ver código fonte

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

master
mtardy 4 anos atrás
pai
commit
cc069fcc92
1 arquivos alterados com 2 adições e 2 exclusões
  1. +2
    -2
      parse.leg

+ 2
- 2
parse.leg Ver arquivo

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

Carregando…
Cancelar
Salvar