Bug 753238 bustage fix: fix uninitialized variable use, and clang build error (error: non-constant-expression cannot be narrowed from type 'int' to 'unsigned int' in initializer list [-Wc++11-narrowing]), irc-r=jlebar

This commit is contained in:
Gavin Sharp 2012-07-07 23:07:26 -07:00
parent ccafc3db47
commit e5147360ff

View File

@ -219,7 +219,7 @@ public:
{
nsresult rv;
nsCOMPtr<nsISupports> dummyUsedToEnsureNSSIsInitialized
= do_GetService("@mozilla.org/psm;1");
= do_GetService("@mozilla.org/psm;1", &rv);
NS_ENSURE_SUCCESS(rv, rv);
return NS_OK;
@ -544,7 +544,7 @@ SignRunnable::Run()
SECOidTag hashAlg = mPrivateKey->keyType == dsaKey ? SEC_OID_SHA1
: SEC_OID_SHA256;
SECItem hashItem = { siBuffer, hash,
hashAlg == SEC_OID_SHA1 ? 20 : 32 };
hashAlg == SEC_OID_SHA1 ? 20u : 32u };
mRv = MapSECStatus(PK11_HashBuf(hashAlg, hash,
const_cast<PRUint8*>(reinterpret_cast<const PRUint8 *>(