diff --git a/mozilla/js/js2/icodegenerator.cpp b/mozilla/js/js2/icodegenerator.cpp index 35187eee449..7bc57ff3168 100644 --- a/mozilla/js/js2/icodegenerator.cpp +++ b/mozilla/js/js2/icodegenerator.cpp @@ -469,7 +469,7 @@ namespace ICG { resetTopRegister(); } - void ICodeGenerator::beginCaseStatement(uint32 pos) + void ICodeGenerator::beginCaseStatement(uint32 /* pos */) { SwitchCodeState *ics = static_cast(stitcher.back()); @@ -489,7 +489,7 @@ namespace ICG { resetTopRegister(); } - void ICodeGenerator::beginDefaultStatement(uint32 pos) + void ICodeGenerator::beginDefaultStatement(uint32 /* pos */) { SwitchCodeState *ics = static_cast(stitcher.back()); @@ -582,7 +582,7 @@ namespace ICG { /************************************************************************/ - void ICodeGenerator::breakStatement(uint32 pos) + void ICodeGenerator::breakStatement(uint32 /* pos */) { for (std::vector::reverse_iterator p = stitcher.rbegin(); p != stitcher.rend(); p++) { @@ -602,7 +602,8 @@ namespace ICG { NOT_REACHED("no break target available"); } - void ICodeGenerator::breakStatement(uint32 pos, const StringAtom &label) + void ICodeGenerator::breakStatement(uint32 /* pos */, + const StringAtom &label) { uint32 statementLabelCeiling = statementLabels.size(); @@ -625,7 +626,7 @@ namespace ICG { NOT_REACHED("no break target available"); } - void ICodeGenerator::continueStatement(uint32 pos) + void ICodeGenerator::continueStatement(uint32 /* pos */) { for (std::vector::reverse_iterator p = stitcher.rbegin(); p != stitcher.rend(); p++) { @@ -644,7 +645,8 @@ namespace ICG { NOT_REACHED("no continue target available"); } - void ICodeGenerator::continueStatement(uint32 pos, const StringAtom &label) + void ICodeGenerator::continueStatement(uint32 /* pos */, + const StringAtom &label) { uint32 statementLabelCeiling = statementLabels.size(); @@ -668,7 +670,8 @@ namespace ICG { } /********************************************************************/ - void ICodeGenerator::beginTryStatement(uint32 pos, bool hasCatch, bool hasFinally) + void ICodeGenerator::beginTryStatement(uint32 /* pos */, + bool hasCatch, bool hasFinally) { addStitcher(new TryCodeState((hasCatch) ? getLabel() : NULL, (hasFinally) ? getLabel() : NULL, this)); @@ -692,13 +695,13 @@ namespace ICG { setLabel(ics->beyondCatch); } - void ICodeGenerator::beginCatchStatement(uint32 pos) + void ICodeGenerator::beginCatchStatement(uint32 /* pos */) { TryCodeState *ics = static_cast(stitcher.back()); ASSERT(ics->stateKind == Try_state); } - void ICodeGenerator::endCatchExpression(Register expression) + void ICodeGenerator::endCatchExpression(Register /* expression */) { TryCodeState *ics = static_cast(stitcher.back()); ASSERT(ics->stateKind == Try_state); @@ -710,7 +713,7 @@ namespace ICG { ASSERT(ics->stateKind == Try_state); } - void ICodeGenerator::beginFinallyStatement(uint32 pos) + void ICodeGenerator::beginFinallyStatement(uint32 /* pos */) { TryCodeState *ics = static_cast(stitcher.back()); ASSERT(ics->stateKind == Try_state); diff --git a/mozilla/js/js2/icodegenerator.h b/mozilla/js/js2/icodegenerator.h index e26b53849b8..f5a8c3ebcf7 100644 --- a/mozilla/js/js2/icodegenerator.h +++ b/mozilla/js/js2/icodegenerator.h @@ -223,7 +223,7 @@ namespace ICG { void endSwitchStatement(); - void beginLabelStatement(uint32 pos, const StringAtom &label) + void beginLabelStatement(uint32 /* pos */, const StringAtom &label) { statementLabels.push_back(&label); } void endLabelStatement() { statementLabels.pop_back(); } @@ -233,7 +233,7 @@ namespace ICG { void continueStatement(uint32 pos, const StringAtom &label); void breakStatement(uint32 pos, const StringAtom &label); - void throwStatement(uint32 pos, Register expression) + void throwStatement(uint32 /* pos */, Register expression) { iCode->push_back(new Throw(expression)); } void beginTryStatement(uint32 pos, bool hasCatch, bool hasFinally); @@ -350,8 +350,8 @@ namespace ICG { inline ICodeState::ICodeState(StateKind kind, ICodeGenerator *icg) : stateKind(kind), registerBase(icg->getRegisterBase()), - breakLabel(NULL), continueLabel(NULL), - statementLabelBase(icg->getStatementLabelBase()) { } + statementLabelBase(icg->getStatementLabelBase()), breakLabel(NULL), + continueLabel(NULL) { } inline SwitchCodeState::SwitchCodeState(Register control, ICodeGenerator *icg) diff --git a/mozilla/js/js2/parser.cpp b/mozilla/js/js2/parser.cpp index 7fdd9abdd86..5dd3beda467 100644 --- a/mozilla/js/js2/parser.cpp +++ b/mozilla/js/js2/parser.cpp @@ -1361,8 +1361,9 @@ JS::ExprNode *JS::Parser::parsePostfixExpression(bool newExpression) // Parse and return a NonAssignmentExpression. -// If the first token was peeked, it should be have been done with preferRegExp set to true. -JS::ExprNode *JS::Parser::parseNonAssignmentExpression(bool noIn) +// If the first token was peeked, it should be have been done with preferRegExp +// set to true. +JS::ExprNode *JS::Parser::parseNonAssignmentExpression(bool /* noIn */) { checkStackSize(); syntaxError("***** parseNonAssignmentExpression not implemented yet *****"); @@ -1371,8 +1372,9 @@ JS::ExprNode *JS::Parser::parseNonAssignmentExpression(bool noIn) // Parse and return an AssignmentExpression. -// If the first token was peeked, it should be have been done with preferRegExp set to true. -JS::ExprNode *JS::Parser::parseAssignmentExpression(bool noIn) +// If the first token was peeked, it should be have been done with +// preferRegExp set to true. +JS::ExprNode *JS::Parser::parseAssignmentExpression(bool /* noIn */) { checkStackSize(); syntaxError("***** parseAssignmentExpression not implemented yet *****"); @@ -1381,8 +1383,9 @@ JS::ExprNode *JS::Parser::parseAssignmentExpression(bool noIn) // Parse and return an Expression. -// If the first token was peeked, it should be have been done with preferRegExp set to true. -JS::ExprNode *JS::Parser::parseExpression(bool noIn) +// If the first token was peeked, it should be have been done with preferRegExp +// set to true. +JS::ExprNode *JS::Parser::parseExpression(bool /* noIn */) { checkStackSize(); syntaxError("***** parseExpression not implemented yet *****"); diff --git a/mozilla/js/js2/utilities.cpp b/mozilla/js/js2/utilities.cpp index 958f62030a4..b942a9ee3ed 100644 --- a/mozilla/js/js2/utilities.cpp +++ b/mozilla/js/js2/utilities.cpp @@ -1949,7 +1949,7 @@ void JS::AsciiFileFormatter::printVFormat8(const char *format, va_list args) while (true) { int n = vsnprintf(b.buffer, b.size, format, args); - if (n >= 0 && n < b.size) { + if (n >= 0 && n < (int)b.size) { printStr8(b.buffer, b.buffer + n); return; } diff --git a/mozilla/js2/src/icodegenerator.cpp b/mozilla/js2/src/icodegenerator.cpp index 35187eee449..7bc57ff3168 100644 --- a/mozilla/js2/src/icodegenerator.cpp +++ b/mozilla/js2/src/icodegenerator.cpp @@ -469,7 +469,7 @@ namespace ICG { resetTopRegister(); } - void ICodeGenerator::beginCaseStatement(uint32 pos) + void ICodeGenerator::beginCaseStatement(uint32 /* pos */) { SwitchCodeState *ics = static_cast(stitcher.back()); @@ -489,7 +489,7 @@ namespace ICG { resetTopRegister(); } - void ICodeGenerator::beginDefaultStatement(uint32 pos) + void ICodeGenerator::beginDefaultStatement(uint32 /* pos */) { SwitchCodeState *ics = static_cast(stitcher.back()); @@ -582,7 +582,7 @@ namespace ICG { /************************************************************************/ - void ICodeGenerator::breakStatement(uint32 pos) + void ICodeGenerator::breakStatement(uint32 /* pos */) { for (std::vector::reverse_iterator p = stitcher.rbegin(); p != stitcher.rend(); p++) { @@ -602,7 +602,8 @@ namespace ICG { NOT_REACHED("no break target available"); } - void ICodeGenerator::breakStatement(uint32 pos, const StringAtom &label) + void ICodeGenerator::breakStatement(uint32 /* pos */, + const StringAtom &label) { uint32 statementLabelCeiling = statementLabels.size(); @@ -625,7 +626,7 @@ namespace ICG { NOT_REACHED("no break target available"); } - void ICodeGenerator::continueStatement(uint32 pos) + void ICodeGenerator::continueStatement(uint32 /* pos */) { for (std::vector::reverse_iterator p = stitcher.rbegin(); p != stitcher.rend(); p++) { @@ -644,7 +645,8 @@ namespace ICG { NOT_REACHED("no continue target available"); } - void ICodeGenerator::continueStatement(uint32 pos, const StringAtom &label) + void ICodeGenerator::continueStatement(uint32 /* pos */, + const StringAtom &label) { uint32 statementLabelCeiling = statementLabels.size(); @@ -668,7 +670,8 @@ namespace ICG { } /********************************************************************/ - void ICodeGenerator::beginTryStatement(uint32 pos, bool hasCatch, bool hasFinally) + void ICodeGenerator::beginTryStatement(uint32 /* pos */, + bool hasCatch, bool hasFinally) { addStitcher(new TryCodeState((hasCatch) ? getLabel() : NULL, (hasFinally) ? getLabel() : NULL, this)); @@ -692,13 +695,13 @@ namespace ICG { setLabel(ics->beyondCatch); } - void ICodeGenerator::beginCatchStatement(uint32 pos) + void ICodeGenerator::beginCatchStatement(uint32 /* pos */) { TryCodeState *ics = static_cast(stitcher.back()); ASSERT(ics->stateKind == Try_state); } - void ICodeGenerator::endCatchExpression(Register expression) + void ICodeGenerator::endCatchExpression(Register /* expression */) { TryCodeState *ics = static_cast(stitcher.back()); ASSERT(ics->stateKind == Try_state); @@ -710,7 +713,7 @@ namespace ICG { ASSERT(ics->stateKind == Try_state); } - void ICodeGenerator::beginFinallyStatement(uint32 pos) + void ICodeGenerator::beginFinallyStatement(uint32 /* pos */) { TryCodeState *ics = static_cast(stitcher.back()); ASSERT(ics->stateKind == Try_state); diff --git a/mozilla/js2/src/icodegenerator.h b/mozilla/js2/src/icodegenerator.h index e26b53849b8..f5a8c3ebcf7 100644 --- a/mozilla/js2/src/icodegenerator.h +++ b/mozilla/js2/src/icodegenerator.h @@ -223,7 +223,7 @@ namespace ICG { void endSwitchStatement(); - void beginLabelStatement(uint32 pos, const StringAtom &label) + void beginLabelStatement(uint32 /* pos */, const StringAtom &label) { statementLabels.push_back(&label); } void endLabelStatement() { statementLabels.pop_back(); } @@ -233,7 +233,7 @@ namespace ICG { void continueStatement(uint32 pos, const StringAtom &label); void breakStatement(uint32 pos, const StringAtom &label); - void throwStatement(uint32 pos, Register expression) + void throwStatement(uint32 /* pos */, Register expression) { iCode->push_back(new Throw(expression)); } void beginTryStatement(uint32 pos, bool hasCatch, bool hasFinally); @@ -350,8 +350,8 @@ namespace ICG { inline ICodeState::ICodeState(StateKind kind, ICodeGenerator *icg) : stateKind(kind), registerBase(icg->getRegisterBase()), - breakLabel(NULL), continueLabel(NULL), - statementLabelBase(icg->getStatementLabelBase()) { } + statementLabelBase(icg->getStatementLabelBase()), breakLabel(NULL), + continueLabel(NULL) { } inline SwitchCodeState::SwitchCodeState(Register control, ICodeGenerator *icg) diff --git a/mozilla/js2/src/parser.cpp b/mozilla/js2/src/parser.cpp index 7fdd9abdd86..5dd3beda467 100644 --- a/mozilla/js2/src/parser.cpp +++ b/mozilla/js2/src/parser.cpp @@ -1361,8 +1361,9 @@ JS::ExprNode *JS::Parser::parsePostfixExpression(bool newExpression) // Parse and return a NonAssignmentExpression. -// If the first token was peeked, it should be have been done with preferRegExp set to true. -JS::ExprNode *JS::Parser::parseNonAssignmentExpression(bool noIn) +// If the first token was peeked, it should be have been done with preferRegExp +// set to true. +JS::ExprNode *JS::Parser::parseNonAssignmentExpression(bool /* noIn */) { checkStackSize(); syntaxError("***** parseNonAssignmentExpression not implemented yet *****"); @@ -1371,8 +1372,9 @@ JS::ExprNode *JS::Parser::parseNonAssignmentExpression(bool noIn) // Parse and return an AssignmentExpression. -// If the first token was peeked, it should be have been done with preferRegExp set to true. -JS::ExprNode *JS::Parser::parseAssignmentExpression(bool noIn) +// If the first token was peeked, it should be have been done with +// preferRegExp set to true. +JS::ExprNode *JS::Parser::parseAssignmentExpression(bool /* noIn */) { checkStackSize(); syntaxError("***** parseAssignmentExpression not implemented yet *****"); @@ -1381,8 +1383,9 @@ JS::ExprNode *JS::Parser::parseAssignmentExpression(bool noIn) // Parse and return an Expression. -// If the first token was peeked, it should be have been done with preferRegExp set to true. -JS::ExprNode *JS::Parser::parseExpression(bool noIn) +// If the first token was peeked, it should be have been done with preferRegExp +// set to true. +JS::ExprNode *JS::Parser::parseExpression(bool /* noIn */) { checkStackSize(); syntaxError("***** parseExpression not implemented yet *****"); diff --git a/mozilla/js2/src/utilities.cpp b/mozilla/js2/src/utilities.cpp index 958f62030a4..b942a9ee3ed 100644 --- a/mozilla/js2/src/utilities.cpp +++ b/mozilla/js2/src/utilities.cpp @@ -1949,7 +1949,7 @@ void JS::AsciiFileFormatter::printVFormat8(const char *format, va_list args) while (true) { int n = vsnprintf(b.buffer, b.size, format, args); - if (n >= 0 && n < b.size) { + if (n >= 0 && n < (int)b.size) { printStr8(b.buffer, b.buffer + n); return; }