function wo return is an error - not warning

R=r
OCL=15169
CL=15169
This commit is contained in:
Ken Thompson 2008-09-11 15:44:45 -07:00
parent 0ba1db7475
commit ff65872fbf

View File

@ -54,7 +54,7 @@ walk(Node *fn)
}
if(curfn->type->outtuple)
if(walkret(curfn->nbody))
warn("function ends without a return statement");
yyerror("function ends without a return statement");
walkstate(curfn->nbody);
if(debug['W']) {
snprint(s, sizeof(s), "after %S", curfn->nname->sym);