Bug 742788: Fix two 'warning: comparison of unsigned expression >= 0 is always true' in js. r=luke

This commit is contained in:
Daniel Holbert 2012-04-05 10:56:22 -07:00
parent b1e2d31e5b
commit 223d54613a
2 changed files with 1 additions and 2 deletions

View File

@ -951,7 +951,6 @@ LeaveWith(JSContext *cx)
{
WithObject &withobj = cx->fp()->scopeChain().asWith();
JS_ASSERT(withobj.maybeStackFrame() == js_FloatingFrameIfGenerator(cx, cx->fp()));
JS_ASSERT(withobj.stackDepth() >= 0);
withobj.setStackFrame(NULL);
cx->fp()->setScopeChainNoCallObj(withobj.enclosingScope());
}

View File

@ -775,7 +775,7 @@ Sprinter::stringAt(ptrdiff_t off) const
char &
Sprinter::operator[](size_t off)
{
JS_ASSERT(off >= 0 && (size_t) off < size);
JS_ASSERT(off < size);
return *(base + off);
}