From 2c1309ffc717cec27967f4b39c8963aba2a86e71 Mon Sep 17 00:00:00 2001 From: David Garske Date: Wed, 3 Aug 2016 16:53:53 -0700 Subject: [PATCH] Fixes for warnings when cross-compiling with GCC ARM. --- src/internal.c | 6 ++++-- wolfcrypt/src/rsa.c | 2 ++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/internal.c b/src/internal.c index fe591c849..6af1597ee 100755 --- a/src/internal.c +++ b/src/internal.c @@ -12320,7 +12320,7 @@ const char* wolfSSL_get_cipher_name_internal(WOLFSSL* ssl) const char* fullName; const char* first; WOLFSSL_CIPHER* cipher; - word32 i; + int i; if (ssl == NULL) { WOLFSSL_MSG("Bad argument"); @@ -12335,7 +12335,7 @@ const char* wolfSSL_get_cipher_name_internal(WOLFSSL* ssl) : (XSTRSTR(fullName, "CCM")) ? "CCM" : NULL; /* normal */ - for (i = 0; i < sizeof(cipher_name_idx); i++) { + for (i = 0; i < (int)sizeof(cipher_name_idx); i++) { if (cipher_name_idx[i] == ssl->options.cipherSuite) { const char* nameFound = cipher_names[i]; @@ -15927,6 +15927,8 @@ int DoSessionTicket(WOLFSSL* ssl, (void)ssl; (void)sigSz; + (void)length; + (void)idx; #ifdef WOLFSSL_ASYNC_CRYPT ret = wolfSSL_async_pop(ssl, WOLF_EVENT_TYPE_ASYNC_ACCEPT); diff --git a/wolfcrypt/src/rsa.c b/wolfcrypt/src/rsa.c index 554fba998..616bcaf37 100644 --- a/wolfcrypt/src/rsa.c +++ b/wolfcrypt/src/rsa.c @@ -253,6 +253,8 @@ static int wc_MGF1(enum wc_HashType hType, byte* seed, word32 seedSz, counter = 0; idx = 0; + (void)heap; + /* check error return of wc_HashGetDigestSize */ if (hLen < 0) { return hLen;