From 909b4954a9e2045a3414a861c598ac7acd956ab5 Mon Sep 17 00:00:00 2001 From: Karel Miko Date: Fri, 14 Jul 2017 19:59:03 +0200 Subject: [PATCH] fix MS Windows/64bit related warnings --- demos/timing.c | 2 +- src/headers/tomcrypt_math.h | 2 +- src/math/radix_to_bin.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/demos/timing.c b/demos/timing.c index 746055d..1b74af9 100644 --- a/demos/timing.c +++ b/demos/timing.c @@ -919,7 +919,7 @@ static void time_dh(void) dh_free(&key); } t2 >>= 4; - fprintf(stderr, "DH-%4lu make_key took %15llu cycles\n", x*8, t2); + fprintf(stderr, "DH-%4lu make_key took %15"PRI64"u cycles\n", x*8, t2); } } #else diff --git a/src/headers/tomcrypt_math.h b/src/headers/tomcrypt_math.h index a52fb9d..b655346 100644 --- a/src/headers/tomcrypt_math.h +++ b/src/headers/tomcrypt_math.h @@ -30,7 +30,7 @@ #define LTC_MILLER_RABIN_REPS 35 #endif -int radix_to_bin(const void *in, int radix, void *out, size_t* len); +int radix_to_bin(const void *in, int radix, void *out, unsigned long *len); /** math descriptor */ typedef struct { diff --git a/src/math/radix_to_bin.c b/src/math/radix_to_bin.c index fef58ae..409bd20 100644 --- a/src/math/radix_to_bin.c +++ b/src/math/radix_to_bin.c @@ -31,9 +31,9 @@ @return CRYPT_OK on success. */ -int radix_to_bin(const void *in, int radix, void *out, size_t* len) +int radix_to_bin(const void *in, int radix, void *out, unsigned long *len) { - size_t l; + unsigned long l; void* mpi; int err;