Bug 1256956 - Silence some GCC warnings. r=luke.

--HG--
extra : commitid : DSvLpEoSinI
extra : rebase_source : 2a801a7f74212d9cec100deb23de899f0c3d50e3
This commit is contained in:
Jason Orendorff 2016-03-15 10:26:26 -05:00
parent 06e68fbd5a
commit b82c949ced
4 changed files with 8 additions and 1 deletions

View File

@ -1630,6 +1630,7 @@ class MOZ_STACK_CLASS ModuleValidator
return standardLibrarySimdOpNames_.putNew(atom->asPropertyName(), op);
}
bool newSig(Sig&& sig, uint32_t* sigIndex) {
*sigIndex = 0;
if (mg_.numSigs() >= MaxSigs)
return failCurrentOffset("too many signatures");
@ -2907,6 +2908,7 @@ CheckFunctionHead(ModuleValidator& m, ParseNode* fn)
static bool
CheckArgument(ModuleValidator& m, ParseNode* arg, PropertyName** name)
{
*name = nullptr;
if (!IsDefinition(arg))
return m.fail(arg, "duplicate argument name not allowed");
@ -3621,6 +3623,8 @@ static bool
CheckArrayAccess(FunctionValidator& f, ParseNode* viewName, ParseNode* indexExpr,
bool isSimd, Scalar::Type* viewType, int32_t* mask)
{
*mask = 0;
if (!viewName->isKind(PNK_NAME))
return f.fail(viewName, "base of array access must be a typed array view name");

View File

@ -1086,7 +1086,7 @@ typedef Vector<ImportName, 0, SystemAllocPolicy> ImportNameVector;
static bool
DecodeImport(JSContext* cx, Decoder& d, ModuleGeneratorData* init, ImportNameVector* importNames)
{
const DeclaredSig* sig;
const DeclaredSig* sig = nullptr;
if (!DecodeSignatureIndex(cx, d, *init, &sig))
return false;

View File

@ -2301,6 +2301,8 @@ template <typename Float>
static bool
ParseFloatLiteral(WasmParseContext& c, WasmToken token, Float* result)
{
*result = 0;
switch (token.kind()) {
case WasmToken::Index:
*result = token.index();

View File

@ -3207,6 +3207,7 @@ MustBeUInt32(MDefinition* def, MDefinition** pwrapped)
return defConst->type() == MIRType_Int32 && defConst->toInt32() >= 0;
}
*pwrapped = nullptr; // silence GCC warning
return false;
}