crypt32: Remove dead assignments in cert.c (Cppcheck)
Bruno Jesus
00cpxxx at gmail.com
Fri Oct 31 20:44:29 CDT 2014
[dlls\crypt32\cert.c:987] -> [dlls\crypt32\cert.c:997]: (performance)
Variable 'matches' is reassigned a value before the old one has been
used.
[dlls\crypt32\cert.c:1145] -> [dlls\crypt32\cert.c:1149]:
(performance) Variable 'matches' is reassigned a value before the old
one has been used.
[dlls\crypt32\cert.c:2890] -> [dlls\crypt32\cert.c:2894]:
(performance) Variable 'set' is reassigned a value before the old one
has been used.
[dlls\crypt32\cert.c:3102] -> [dlls\crypt32\cert.c:3107]:
(performance) Variable 'size' is reassigned a value before the old one
has been used.
-------------- next part --------------
diff --git a/dlls/crypt32/cert.c b/dlls/crypt32/cert.c
index c35f504..0cda2c4 100644
--- a/dlls/crypt32/cert.c
+++ b/dlls/crypt32/cert.c
@@ -984,7 +984,7 @@ static BOOL container_matches_cert(PCCERT_CONTEXT pCert, LPCSTR container,
{
CRYPT_KEY_PROV_INFO copy;
WCHAR containerW[MAX_PATH];
- BOOL matches = FALSE;
+ BOOL matches;
MultiByteToWideChar(CP_ACP, 0, container, -1,
containerW, sizeof(containerW) / sizeof(containerW[0]));
@@ -1142,7 +1142,7 @@ static BOOL cert_prov_info_matches_cert(PCCERT_CONTEXT pCert)
BOOL WINAPI CryptFindCertificateKeyProvInfo(PCCERT_CONTEXT pCert,
DWORD dwFlags, void *pvReserved)
{
- BOOL matches = FALSE;
+ BOOL matches;
TRACE("(%p, %08x, %p)\n", pCert, dwFlags, pvReserved);
@@ -2887,7 +2887,7 @@ static void CRYPT_SetBitInField(struct BitField *field, DWORD bit)
static BOOL CRYPT_IsBitInFieldSet(const struct BitField *field, DWORD bit)
{
- BOOL set = FALSE;
+ BOOL set;
DWORD indexIndex = bit / BITS_PER_DWORD;
assert(field->cIndexes);
@@ -3099,7 +3099,6 @@ static void CertContext_SetKeyProvInfo(PCCERT_CONTEXT context,
CryptMemFree(szProvider);
}
}
- size = sizeof(info.dwKeySpec);
/* in case no CRYPT_KEY_PROV_INFO given,
* we always use AT_SIGNATURE key spec
*/
More information about the wine-patches
mailing list