Parcourir la source

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

master
mtardy il y a 4 ans
Parent
révision
cc069fcc92
1 fichiers modifiés avec 2 ajouts et 2 suppressions
  1. +2
    -2
      parse.leg

+ 2
- 2
parse.leg Voir le fichier

@ -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

Chargement…
Annuler
Enregistrer