diff options
author | George Hazan <george.hazan@gmail.com> | 2013-06-24 12:35:43 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-06-24 12:35:43 +0000 |
commit | 9d62e31863057f847b56e82e3880c4c588c9cb0a (patch) | |
tree | 81215235f7bc58bdc549cf12522cf39150597cd3 /protocols/WhatsApp/src/OpenSSL | |
parent | dc2a9c66749ef4c8c6a748218bf80b80d0bbe0d6 (diff) |
warning fix
git-svn-id: http://svn.miranda-ng.org/main/trunk@5118 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/WhatsApp/src/OpenSSL')
-rw-r--r-- | protocols/WhatsApp/src/OpenSSL/md32_common.h | 4 | ||||
-rw-r--r-- | protocols/WhatsApp/src/OpenSSL/p5_crpt2.c | 3 |
2 files changed, 4 insertions, 3 deletions
diff --git a/protocols/WhatsApp/src/OpenSSL/md32_common.h b/protocols/WhatsApp/src/OpenSSL/md32_common.h index e0deb78015..f0ca0fe631 100644 --- a/protocols/WhatsApp/src/OpenSSL/md32_common.h +++ b/protocols/WhatsApp/src/OpenSSL/md32_common.h @@ -293,7 +293,7 @@ int HASH_UPDATE (HASH_CTX *c, const void *data_, size_t len) * Wei Dai <weidai@eskimo.com> for pointing it out. */ if (l < c->Nl) /* overflow */ c->Nh++; - c->Nh+=(len>>29); /* might cause compiler warning on 16-bit */ + c->Nh += (unsigned long)(len>>29); /* might cause compiler warning on 16-bit */ c->Nl=l; n = c->num; @@ -331,7 +331,7 @@ int HASH_UPDATE (HASH_CTX *c, const void *data_, size_t len) if (len != 0) { p = (unsigned char *)c->data; - c->num = len; + c->num = (unsigned)len; memcpy (p,data,len); } return 1; diff --git a/protocols/WhatsApp/src/OpenSSL/p5_crpt2.c b/protocols/WhatsApp/src/OpenSSL/p5_crpt2.c index cc3b012ac0..18b366d2c2 100644 --- a/protocols/WhatsApp/src/OpenSSL/p5_crpt2.c +++ b/protocols/WhatsApp/src/OpenSSL/p5_crpt2.c @@ -56,6 +56,7 @@ * */ #include <stdio.h> +#include <string.h> #include <stdlib.h> #include "evp.h" @@ -82,7 +83,7 @@ int PKCS5_PBKDF2_HMAC_SHA1(const char *pass, int passlen, p = out; tkeylen = keylen; if(!pass) passlen = 0; - else if(passlen == -1) passlen = strlen(pass); + else if(passlen == -1) passlen = (int)strlen(pass); while(tkeylen) { if(tkeylen > SHA_DIGEST_LENGTH) cplen = SHA_DIGEST_LENGTH; else cplen = tkeylen; |