Fix some MSVC12 conversion warnings
diff --git a/library/ctr_drbg.c b/library/ctr_drbg.c
index 3be65e1..3cb6341 100644
--- a/library/ctr_drbg.c
+++ b/library/ctr_drbg.c
@@ -456,7 +456,7 @@
{ 0xa0, 0x54, 0x30, 0x3d, 0x8a, 0x7e, 0xa9, 0x88,
0x9d, 0x90, 0x3e, 0x07, 0x7c, 0x6f, 0x21, 0x8f };
-static int test_offset;
+static size_t test_offset;
static int ctr_drbg_self_test_entropy( void *data, unsigned char *buf,
size_t len )
{
diff --git a/library/ecdsa.c b/library/ecdsa.c
index 12076d5..94522a4 100644
--- a/library/ecdsa.c
+++ b/library/ecdsa.c
@@ -49,7 +49,7 @@
*
* Argument is the minimum size in bytes of the MD output.
*/
-static const md_info_t *md_info_by_size( int min_size )
+static const md_info_t *md_info_by_size( size_t min_size )
{
const md_info_t *md_cur, *md_picked = NULL;
const int *md_alg;
@@ -57,7 +57,7 @@
for( md_alg = md_list(); *md_alg != 0; md_alg++ )
{
if( ( md_cur = md_info_from_type( *md_alg ) ) == NULL ||
- md_cur->size < min_size ||
+ (size_t) md_cur->size < min_size ||
( md_picked != NULL && md_cur->size > md_picked->size ) )
continue;
diff --git a/library/hmac_drbg.c b/library/hmac_drbg.c
index 7a21092..c05717b 100644
--- a/library/hmac_drbg.c
+++ b/library/hmac_drbg.c
@@ -414,7 +414,7 @@
0xe8, 0x5f, 0x13, 0x0f, 0xc8, 0xa4, 0x59, 0xb7 };
/* "Entropy" from buffer */
-static int test_offset;
+static size_t test_offset;
static int hmac_drbg_self_test_entropy( void *data,
unsigned char *buf, size_t len )
{