bug 865715 - eliminate uninitialized-variable warning in nsGUIEventIPC.h. r=smaug

This commit is contained in:
Jonathan Kew 2013-04-26 08:41:27 +01:00
parent 2f7f9ec77a
commit 7cb1f429d4

View File

@ -262,17 +262,18 @@ struct ParamTraits<nsKeyEvent>
static bool Read(const Message* aMsg, void** aIter, paramType* aResult)
{
bool rv;
uint32_t keyNameIndex;
rv = ReadParam(aMsg, aIter, static_cast<nsInputEvent*>(aResult)) &&
ReadParam(aMsg, aIter, &keyNameIndex) &&
ReadParam(aMsg, aIter, &aResult->keyCode) &&
ReadParam(aMsg, aIter, &aResult->charCode) &&
ReadParam(aMsg, aIter, &aResult->isChar) &&
ReadParam(aMsg, aIter, &aResult->location);
aResult->mKeyNameIndex =
static_cast<mozilla::widget::KeyNameIndex>(keyNameIndex);
return rv;
if (ReadParam(aMsg, aIter, static_cast<nsInputEvent*>(aResult)) &&
ReadParam(aMsg, aIter, &keyNameIndex) &&
ReadParam(aMsg, aIter, &aResult->keyCode) &&
ReadParam(aMsg, aIter, &aResult->charCode) &&
ReadParam(aMsg, aIter, &aResult->isChar) &&
ReadParam(aMsg, aIter, &aResult->location)) {
aResult->mKeyNameIndex =
static_cast<mozilla::widget::KeyNameIndex>(keyNameIndex);
return true;
}
return false;
}
};