[INFER] Fix warnings.

This commit is contained in:
Brian Hackett 2011-08-15 11:41:52 -07:00
parent e0b3aa4f6f
commit 5ce12bd4b1
4 changed files with 13 additions and 11 deletions

View File

@ -890,7 +890,7 @@ ScriptAnalysis::analyzeLifetimes(JSContext *cx)
loop->lastBlock = offset;
if (code->exceptionEntry) {
bool found = false;
DebugOnly<bool> found = false;
JSTryNote *tn = script->trynotes()->vector;
JSTryNote *tnlimit = tn + script->trynotes()->length;
for (; tn < tnlimit; tn++) {
@ -905,7 +905,9 @@ ScriptAnalysis::analyzeLifetimes(JSContext *cx)
ensureVariable(lifetimes[i], startOffset - 1);
}
#ifdef DEBUG
found = true;
#endif
break;
}
}

View File

@ -3413,7 +3413,7 @@ js_CloneBlockObject(JSContext *cx, JSObject *proto, StackFrame *fp)
TypeObject *type = proto->getNewType(cx);
if (!type)
return false;
return NULL;
JSObject *clone = js_NewGCObject(cx, kind);
if (!clone)

View File

@ -778,7 +778,7 @@ mjit::Compiler::generatePrologue()
StackFrame::UNDERFLOW_ARGS |
StackFrame::OVERFLOW_ARGS |
StackFrame::HAS_ARGS_OBJ));
masm.storePtr(ImmPtr((void *) script->function()->nargs),
masm.storePtr(ImmPtr((void *)(size_t) script->function()->nargs),
Address(JSFrameReg, StackFrame::offsetOfArgs()));
hasArgs.linkTo(masm.label(), &masm);
}

View File

@ -92,8 +92,8 @@ mjit::Compiler::compileMathAbsDouble(FrameEntry *arg)
FPRegisterID fpReg;
bool allocate;
MaybeJump notNumber = loadDouble(arg, &fpReg, &allocate);
JS_ASSERT(!notNumber.isSet());
DebugOnly<MaybeJump> notNumber = loadDouble(arg, &fpReg, &allocate);
JS_ASSERT(!((MaybeJump)notNumber).isSet());
masm.absDouble(fpReg, fpResultReg);
@ -114,8 +114,8 @@ mjit::Compiler::compileRound(FrameEntry *arg, RoundingMode mode)
FPRegisterID fpReg;
bool allocate;
MaybeJump notNumber = loadDouble(arg, &fpReg, &allocate);
JS_ASSERT(!notNumber.isSet());
DebugOnly<MaybeJump> notNumber = loadDouble(arg, &fpReg, &allocate);
JS_ASSERT(!((MaybeJump)notNumber).isSet());
masm.zeroDouble(fpScratchReg);
@ -161,8 +161,8 @@ mjit::Compiler::compileMathSqrt(FrameEntry *arg)
FPRegisterID fpReg;
bool allocate;
MaybeJump notNumber = loadDouble(arg, &fpReg, &allocate);
JS_ASSERT(!notNumber.isSet());
DebugOnly<MaybeJump> notNumber = loadDouble(arg, &fpReg, &allocate);
JS_ASSERT(!((MaybeJump)notNumber).isSet());
masm.sqrtDouble(fpReg, fpResultReg);
@ -184,8 +184,8 @@ mjit::Compiler::compileMathPowSimple(FrameEntry *arg1, FrameEntry *arg2)
FPRegisterID fpReg;
bool allocate;
MaybeJump notNumber = loadDouble(arg1, &fpReg, &allocate);
JS_ASSERT(!notNumber.isSet());
DebugOnly<MaybeJump> notNumber = loadDouble(arg1, &fpReg, &allocate);
JS_ASSERT(!((MaybeJump)notNumber).isSet());
/* Slow path for -Infinity (must return Infinity, not NaN). */
masm.slowLoadConstantDouble(js_NegativeInfinity, fpResultReg);