From 0b1ea204b7ad1b2f76e229ac099beca69ee8d17c Mon Sep 17 00:00:00 2001 From: John Safranek Date: Tue, 12 May 2015 11:59:07 -0700 Subject: [PATCH] cleaned up Windows build warnings --- wolfcrypt/src/random.c | 4 ++-- wolfcrypt/test/test.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/wolfcrypt/src/random.c b/wolfcrypt/src/random.c index 22b49cbf8..d1786e5b1 100755 --- a/wolfcrypt/src/random.c +++ b/wolfcrypt/src/random.c @@ -338,13 +338,13 @@ static INLINE void array_add(byte* d, word32 dLen, const byte* s, word32 sLen) for (sIdx = sLen - 1, dIdx = dLen - 1; sIdx >= 0; dIdx--, sIdx--) { carry += d[dIdx] + s[sIdx]; - d[dIdx] = carry; + d[dIdx] = (byte)carry; carry >>= 8; } for (; carry != 0 && dIdx >= 0; dIdx--) { carry += d[dIdx]; - d[dIdx] = carry; + d[dIdx] = (byte)carry; carry >>= 8; } } diff --git a/wolfcrypt/test/test.c b/wolfcrypt/test/test.c index 4bf7427b5..2879c01e4 100644 --- a/wolfcrypt/test/test.c +++ b/wolfcrypt/test/test.c @@ -4484,7 +4484,7 @@ int openssl_test(void) EVP_MD_CTX_init(&md_ctx); EVP_DigestInit(&md_ctx, EVP_sha384()); - EVP_DigestUpdate(&md_ctx, e.input, e.inLen); + EVP_DigestUpdate(&md_ctx, e.input, (unsigned long)e.inLen); EVP_DigestFinal(&md_ctx, hash, 0); if (memcmp(hash, e.output, SHA384_DIGEST_SIZE) != 0)