зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1218258 - Fix -Wshadow warnings in toolkit/components/downloads. r=paolo
toolkit/components/downloads/ApplicationReputation.cpp:598:14 [-Wshadow] declaration shadows a local variable toolkit/components/downloads/ApplicationReputation.cpp:721:15 [-Wshadow] declaration shadows a local variable toolkit/components/downloads/ApplicationReputation.cpp:809:29 [-Wshadow] declaration shadows a local variable toolkit/components/downloads/nsDownloadManager.cpp:1268:36 [-Wshadow] declaration shadows a local variable toolkit/components/downloads/nsDownloadManager.cpp:1483:33 [-Wshadow] declaration shadows a local variable
This commit is contained in:
Родитель
130d29b641
Коммит
e61e4b918a
|
@ -596,7 +596,7 @@ PendingLookup::GenerateWhitelistStringsForChain(
|
|||
aChain.element(i).certificate().size(), getter_AddRefs(issuer));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
nsresult rv = GenerateWhitelistStringsForPair(signer, issuer);
|
||||
rv = GenerateWhitelistStringsForPair(signer, issuer);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
}
|
||||
return NS_OK;
|
||||
|
@ -706,24 +706,24 @@ PendingLookup::DoLookupInternal()
|
|||
nsresult rv = mQuery->GetSourceURI(getter_AddRefs(uri));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
nsCString spec;
|
||||
rv = GetStrippedSpec(uri, spec);
|
||||
nsCString sourceSpec;
|
||||
rv = GetStrippedSpec(uri, sourceSpec);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
mAnylistSpecs.AppendElement(spec);
|
||||
mAnylistSpecs.AppendElement(sourceSpec);
|
||||
|
||||
ClientDownloadRequest_Resource* resource = mRequest.add_resources();
|
||||
resource->set_url(spec.get());
|
||||
resource->set_url(sourceSpec.get());
|
||||
resource->set_type(ClientDownloadRequest::DOWNLOAD_URL);
|
||||
|
||||
nsCOMPtr<nsIURI> referrer = nullptr;
|
||||
rv = mQuery->GetReferrerURI(getter_AddRefs(referrer));
|
||||
if (referrer) {
|
||||
nsCString spec;
|
||||
rv = GetStrippedSpec(referrer, spec);
|
||||
nsCString referrerSpec;
|
||||
rv = GetStrippedSpec(referrer, referrerSpec);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
mAnylistSpecs.AppendElement(spec);
|
||||
resource->set_referrer(spec.get());
|
||||
mAnylistSpecs.AppendElement(referrerSpec);
|
||||
resource->set_referrer(referrerSpec.get());
|
||||
}
|
||||
nsCOMPtr<nsIArray> redirects;
|
||||
rv = mQuery->GetRedirects(getter_AddRefs(redirects));
|
||||
|
@ -790,11 +790,11 @@ PendingLookup::ParseCertificates(nsIArray* aSigArray)
|
|||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
while (hasMoreChains) {
|
||||
nsCOMPtr<nsISupports> supports;
|
||||
rv = chains->GetNext(getter_AddRefs(supports));
|
||||
nsCOMPtr<nsISupports> chainSupports;
|
||||
rv = chains->GetNext(getter_AddRefs(chainSupports));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
nsCOMPtr<nsIX509CertList> certList = do_QueryInterface(supports, &rv);
|
||||
nsCOMPtr<nsIX509CertList> certList = do_QueryInterface(chainSupports, &rv);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
safe_browsing::ClientDownloadRequest_CertificateChain* certChain =
|
||||
|
@ -807,11 +807,11 @@ PendingLookup::ParseCertificates(nsIArray* aSigArray)
|
|||
bool hasMoreCerts = false;
|
||||
rv = chainElt->HasMoreElements(&hasMoreCerts);
|
||||
while (hasMoreCerts) {
|
||||
nsCOMPtr<nsISupports> supports;
|
||||
rv = chainElt->GetNext(getter_AddRefs(supports));
|
||||
nsCOMPtr<nsISupports> certSupports;
|
||||
rv = chainElt->GetNext(getter_AddRefs(certSupports));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
nsCOMPtr<nsIX509Cert> cert = do_QueryInterface(supports, &rv);
|
||||
nsCOMPtr<nsIX509Cert> cert = do_QueryInterface(certSupports, &rv);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
uint8_t* data = nullptr;
|
||||
|
|
|
@ -1274,17 +1274,17 @@ nsDownloadManager::GetDownloadFromDB(mozIStorageConnection* aDBConn,
|
|||
if (dl->mGUID.IsEmpty()) {
|
||||
rv = GenerateGUID(dl->mGUID);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
nsCOMPtr<mozIStorageStatement> stmt;
|
||||
nsCOMPtr<mozIStorageStatement> updateStmt;
|
||||
rv = mDBConn->CreateStatement(NS_LITERAL_CSTRING(
|
||||
"UPDATE moz_downloads SET guid = :guid "
|
||||
"WHERE id = :id"),
|
||||
getter_AddRefs(stmt));
|
||||
getter_AddRefs(updateStmt));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
rv = stmt->BindUTF8StringByName(NS_LITERAL_CSTRING("guid"), dl->mGUID);
|
||||
rv = updateStmt->BindUTF8StringByName(NS_LITERAL_CSTRING("guid"), dl->mGUID);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
rv = stmt->BindInt64ByName(NS_LITERAL_CSTRING("id"), dl->mID);
|
||||
rv = updateStmt->BindInt64ByName(NS_LITERAL_CSTRING("id"), dl->mID);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
rv = stmt->Execute();
|
||||
rv = updateStmt->Execute();
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
}
|
||||
|
||||
|
@ -1489,9 +1489,6 @@ nsDownloadManager::GetUserDownloadsDirectory(nsIFile **aResult)
|
|||
case 0: // Desktop
|
||||
{
|
||||
nsCOMPtr<nsIFile> downloadDir;
|
||||
nsCOMPtr<nsIProperties> dirService =
|
||||
do_GetService(NS_DIRECTORY_SERVICE_CONTRACTID, &rv);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
rv = dirService->Get(NS_OS_DESKTOP_DIR,
|
||||
NS_GET_IID(nsIFile),
|
||||
getter_AddRefs(downloadDir));
|
||||
|
|
Загрузка…
Ссылка в новой задаче