зеркало из https://github.com/mozilla/pjs.git
Eliminate non-ECMA warnings about lack of return value
This commit is contained in:
Родитель
3d4095968a
Коммит
0ba91bad7e
|
@ -301,6 +301,7 @@ FunctionBody(JSContext *cx, JSTokenStream *ts, JSFunction *fun,
|
|||
tc->flags |= TCF_IN_FUNCTION;
|
||||
pn = Statements(cx, ts, tc);
|
||||
|
||||
#ifdef CHECK_RETURN_EXPR
|
||||
/* Check for falling off the end of a function that returns a value. */
|
||||
if (pn && (tc->flags & TCF_RETURN_EXPR)) {
|
||||
if (!CheckFinalReturn(pn)) {
|
||||
|
@ -308,6 +309,7 @@ FunctionBody(JSContext *cx, JSTokenStream *ts, JSFunction *fun,
|
|||
pn = NULL;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
cx->fp = fp;
|
||||
tc->flags = oldflags;
|
||||
|
|
|
@ -305,6 +305,7 @@ FunctionBody(JSContext *cx, JSTokenStream *ts, JSFunction *fun,
|
|||
tc->flags |= TCF_IN_FUNCTION;
|
||||
pn = Statements(cx, ts, tc);
|
||||
|
||||
#ifdef CHECK_RETURN_EXPR
|
||||
/* Check for falling off the end of a function that returns a value. */
|
||||
if (pn && (tc->flags & TCF_RETURN_EXPR)) {
|
||||
if (!CheckFinalReturn(pn)) {
|
||||
|
@ -312,6 +313,7 @@ FunctionBody(JSContext *cx, JSTokenStream *ts, JSFunction *fun,
|
|||
pn = NULL;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
cx->fp = fp;
|
||||
tc->flags = oldflags;
|
||||
|
|
Загрузка…
Ссылка в новой задаче