summaryrefslogtreecommitdiff
path: root/lib/certdb/crl.c
diff options
context:
space:
mode:
authorMartin Thomson <martin.thomson@gmail.com>2015-08-07 17:34:12 -0700
committerMartin Thomson <martin.thomson@gmail.com>2015-08-07 17:34:12 -0700
commitdf18e4c7e5e9ad31fab45575896fba7d2bc24250 (patch)
treef07ff7f0e8d1d06e564917eb58af355c1fa7d456 /lib/certdb/crl.c
parentc084b875adee244f5f56dd03e8948239d1f6c076 (diff)
downloadnss-hg-df18e4c7e5e9ad31fab45575896fba7d2bc24250.tar.gz
Bug 1182667 - Removing warnings, enabling -Werror, r=rrelyea
Diffstat (limited to 'lib/certdb/crl.c')
-rw-r--r--lib/certdb/crl.c21
1 files changed, 8 insertions, 13 deletions
diff --git a/lib/certdb/crl.c b/lib/certdb/crl.c
index 9f9aa0b2a..c1a10ef59 100644
--- a/lib/certdb/crl.c
+++ b/lib/certdb/crl.c
@@ -627,7 +627,6 @@ crl_storeCRL (PK11SlotInfo *slot,char *url,
CERTSignedCrl *oldCrl = NULL, *crl = NULL;
PRBool deleteOldCrl = PR_FALSE;
CK_OBJECT_HANDLE crlHandle = CK_INVALID_HANDLE;
- SECStatus rv;
PORT_Assert(newCrl);
PORT_Assert(derCrl);
@@ -640,8 +639,8 @@ crl_storeCRL (PK11SlotInfo *slot,char *url,
/* we can't use the cache here because we must look in the same
token */
- rv = SEC_FindCrlByKeyOnSlot(slot, &newCrl->crl.derName, type,
- &oldCrl, CRL_DECODE_SKIP_ENTRIES);
+ (void)SEC_FindCrlByKeyOnSlot(slot, &newCrl->crl.derName, type,
+ &oldCrl, CRL_DECODE_SKIP_ENTRIES);
/* if there is an old crl on the token, make sure the one we are
installing is newer. If not, exit out, otherwise delete the
old crl.
@@ -2693,7 +2692,7 @@ cert_CheckCertRevocationStatus(CERTCertificate* cert, CERTCertificate* issuer,
}
if (SECFailure == rv)
{
- SECStatus rv2 = CERT_FindCRLEntryReasonExten(entry, &reason);
+ (void)CERT_FindCRLEntryReasonExten(entry, &reason);
PORT_SetError(SEC_ERROR_REVOKED_CERTIFICATE);
}
break;
@@ -3050,7 +3049,7 @@ SECStatus cert_CacheCRLByGeneralName(CERTCertDBHandle* dbhandle, SECItem* crl,
{
NamedCRLCacheEntry* oldEntry, * newEntry = NULL;
NamedCRLCache* ncc = NULL;
- SECStatus rv = SECSuccess, rv2;
+ SECStatus rv = SECSuccess;
PORT_Assert(namedCRLCache.lock);
PORT_Assert(namedCRLCache.entries);
@@ -3088,8 +3087,7 @@ SECStatus cert_CacheCRLByGeneralName(CERTCertDBHandle* dbhandle, SECItem* crl,
(void*) newEntry))
{
PORT_Assert(0);
- rv2 = NamedCRLCacheEntry_Destroy(newEntry);
- PORT_Assert(SECSuccess == rv2);
+ NamedCRLCacheEntry_Destroy(newEntry);
rv = SECFailure;
}
}
@@ -3112,8 +3110,7 @@ SECStatus cert_CacheCRLByGeneralName(CERTCertDBHandle* dbhandle, SECItem* crl,
}
else
{
- rv2 = NamedCRLCacheEntry_Destroy(oldEntry);
- PORT_Assert(SECSuccess == rv2);
+ PORT_AssertSuccess(NamedCRLCacheEntry_Destroy(oldEntry));
}
if (NULL == PL_HashTableAdd(namedCRLCache.entries,
(void*) newEntry->canonicalizedName,
@@ -3160,8 +3157,7 @@ SECStatus cert_CacheCRLByGeneralName(CERTCertDBHandle* dbhandle, SECItem* crl,
}
else
{
- rv2 = NamedCRLCacheEntry_Destroy(oldEntry);
- PORT_Assert(SECSuccess == rv2);
+ PORT_AssertSuccess(NamedCRLCacheEntry_Destroy(oldEntry));
}
if (NULL == PL_HashTableAdd(namedCRLCache.entries,
(void*) newEntry->canonicalizedName,
@@ -3173,8 +3169,7 @@ SECStatus cert_CacheCRLByGeneralName(CERTCertDBHandle* dbhandle, SECItem* crl,
}
}
}
- rv2 = cert_ReleaseNamedCRLCache(ncc);
- PORT_Assert(SECSuccess == rv2);
+ PORT_AssertSuccess(cert_ReleaseNamedCRLCache(ncc));
return rv;
}