Bug 883691 - Fix some simple clang warnings in SpiderMonkey. r=bhackett.

--HG--
extra : rebase_source : 168fe0710a42ebf3f90c14ecb12de32305987586
This commit is contained in:
Nicholas Nethercote 2013-06-16 18:12:35 -07:00
Родитель 459c46a60d
Коммит e8555b91b5
5 изменённых файлов: 6 добавлений и 7 удалений

Просмотреть файл

@ -3505,7 +3505,6 @@ Parser<ParseHandler>::switchStatement()
while ((tt = tokenStream.getToken()) != TOK_RC) {
uint32_t caseBegin = tokenStream.currentToken().pos.begin;
ParseNodeKind caseKind;
Node caseExpr;
switch (tt) {
case TOK_DEFAULT:
@ -3514,12 +3513,10 @@ Parser<ParseHandler>::switchStatement()
return null();
}
seenDefault = true;
caseKind = PNK_DEFAULT;
caseExpr = null();
break;
case TOK_CASE:
caseKind = PNK_CASE;
caseExpr = expr();
if (!caseExpr)
return null();

Просмотреть файл

@ -1395,7 +1395,7 @@ bool
LIRGenerator::visitToDouble(MToDouble *convert)
{
MDefinition *opd = convert->input();
MToDouble::ConversionKind conversion = convert->conversion();
mozilla::DebugOnly<MToDouble::ConversionKind> conversion = convert->conversion();
switch (opd->type()) {
case MIRType_Value:

Просмотреть файл

@ -425,11 +425,11 @@ ion::PropagateParallelAbort(JSScript *outermostScript,
void
ion::ParCallToUncompiledScript(JSFunction *func)
{
static const int max_bound_function_unrolling = 5;
JS_ASSERT(InParallelSection());
#ifdef DEBUG
static const int max_bound_function_unrolling = 5;
if (func->hasScript()) {
JSScript *script = func->nonLazyScript();
Spew(SpewBailouts, "Call to uncompiled script: %p:%s:%d",

Просмотреть файл

@ -684,7 +684,7 @@ CodeGeneratorX86Shared::visitDivPowTwoI(LDivPowTwoI *ins)
{
Register lhs = ToRegister(ins->numerator());
Register lhsCopy = ToRegister(ins->numeratorCopy());
Register output = ToRegister(ins->output());
mozilla::DebugOnly<Register> output = ToRegister(ins->output());
int32_t shift = ins->shift();
// We use defineReuseInput so these should always be the same, which is

Просмотреть файл

@ -581,7 +581,9 @@ RegExpShared::executeMatchOnly(JSContext *cx, const jschar *chars, size_t length
if (!compileMatchOnlyIfNecessary(cx))
return RegExpRunStatus_Error;
#ifdef DEBUG
const size_t origLength = length;
#endif
size_t start = *lastIndex;
size_t displacement = 0;