Pārlūkot izejas kodu

Merge pull request #253 from libtom/pr/rc2-fix-win64

Fix MS Windows/64bit related warnings
karel-m 8 gadi atpakaļ
vecāks
revīzija
ff54ec2f0d
3 mainītis faili ar 4 papildinājumiem un 4 dzēšanām
  1. 1 1
      demos/timing.c
  2. 1 1
      src/headers/tomcrypt_math.h
  3. 2 2
      src/math/radix_to_bin.c

+ 1 - 1
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

+ 1 - 1
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 {

+ 2 - 2
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;