fix newer clang warnings

This commit is contained in:
toddouska 2013-12-11 12:03:09 -08:00
parent 9e56ad262c
commit b41d09b1a2
3 changed files with 10 additions and 2 deletions

View File

@ -2563,6 +2563,7 @@ static int ConfirmSignature(const byte* buf, word32 bufSz,
(void)sigSz;
(void)heap;
(void)ret;
(void)typeH;
switch (sigOID) {
#ifndef NO_MD5
@ -3339,6 +3340,7 @@ static void DecodeCertExtensions(DecodedCert* cert)
}
idx += length;
}
(void)critical;
CYASSL_LEAVE("DecodeCertExtensions", 0);
return;

View File

@ -622,6 +622,7 @@ void InitSuites(Suites* suites, ProtocolVersion pv, byte haveRSA, byte havePSK,
(void)tls; /* shut up compiler */
(void)tls1_2;
(void)haveRSA;
(void)haveDH;
(void)havePSK;
(void)haveNTRU;
@ -8118,7 +8119,7 @@ static void PickHashSigAlgo(CYASSL* ssl,
case ecc_diffie_hellman_kea:
{
ecc_key myKey;
ecc_key* peerKey = &myKey;
ecc_key* peerKey = NULL;
word32 size = sizeof(encSecret);
if (ssl->specs.static_ecdh) {
@ -8133,6 +8134,9 @@ static void PickHashSigAlgo(CYASSL* ssl,
peerKey = ssl->peerEccKey;
}
if (peerKey == NULL)
return NO_PEER_KEY;
ecc_init(&myKey);
ret = ecc_make_key(ssl->rng, peerKey->dp->size, &myKey);
if (ret != 0)

View File

@ -1730,6 +1730,7 @@ int CyaSSL_Init(void)
der.buffer = 0;
(void)dynamicType;
(void)rsaKey;
if (used)
*used = sz; /* used bytes default to sz, PEM chain may shorten*/
@ -1980,7 +1981,8 @@ int CyaSSL_Init(void)
}
ecc_free(&key);
eccKey = 1;
ctx->haveStaticECC = 1;
if (ctx)
ctx->haveStaticECC = 1;
if (ssl)
ssl->options.haveStaticECC = 1;
}