diff --git a/cyassl/test.h b/cyassl/test.h index 9ac44e1bb..97bd6e89d 100644 --- a/cyassl/test.h +++ b/cyassl/test.h @@ -289,7 +289,7 @@ static INLINE void ShowX509(CYASSL_X509* x509, const char* hdr) printf("%s\n issuer : %s\n subject: %s\n", hdr, issuer, subject); - while ( (altName = CyaSSL_X509_get_next_altname(x509)) ) + while ( (altName = CyaSSL_X509_get_next_altname(x509)) != NULL) printf(" altname = %s\n", altName); ret = CyaSSL_X509_get_serial_number(x509, serial, &sz); diff --git a/src/ssl.c b/src/ssl.c index 0ea540a68..d208c7be8 100644 --- a/src/ssl.c +++ b/src/ssl.c @@ -160,6 +160,7 @@ CYASSL* CyaSSL_new(CYASSL_CTX* ctx) CYASSL* ssl = NULL; int ret = 0; + (void)ret; CYASSL_ENTER("SSL_new"); if (ctx == NULL) @@ -8184,7 +8185,6 @@ static int initGlobalRNG = 0; byte buff[1024]; RNG tmpRNG; RNG* rng = &tmpRNG; - int ret; int len = bits/8; (void)top; @@ -8199,7 +8199,7 @@ static int initGlobalRNG = 0; if (bits % 8) len++; - if ( (ret = InitRng(&tmpRNG)) != 0) { + if ( (InitRng(&tmpRNG)) != 0) { CYASSL_MSG("Bad RNG Init, trying global"); if (initGlobalRNG == 0) { CYASSL_MSG("Global RNG no Init"); @@ -8467,7 +8467,6 @@ static int initGlobalRNG = 0; word32 privSz = sizeof(priv); RNG tmpRNG; RNG* rng = &tmpRNG; - int ret; CYASSL_MSG("CyaSSL_DH_generate_key"); @@ -8483,7 +8482,7 @@ static int initGlobalRNG = 0; } } - if ( (ret = InitRng(&tmpRNG)) != 0) { + if ( (InitRng(&tmpRNG)) != 0) { CYASSL_MSG("Bad RNG Init, trying global"); if (initGlobalRNG == 0) { CYASSL_MSG("Global RNG no Init"); @@ -9237,11 +9236,9 @@ static int initGlobalRNG = 0; switch(id) { case NID_md5: return CyaSSL_EVP_md5(); - break; case NID_sha1: return CyaSSL_EVP_sha1(); - break; default: CYASSL_MSG("Bad digest id value");