add shorten 64 to 32 warnings back on with fixes

This commit is contained in:
toddouska
2012-10-19 12:44:23 -07:00
parent ba4d058ba7
commit c974d77213
17 changed files with 68 additions and 64 deletions

View File

@@ -1860,7 +1860,7 @@ int mp_exptmod_fast (mp_int * G, mp_int * X, mp_int * P, mp_int * Y,
}
/* grab the next msb from the exponent */
y = (mp_digit)(buf >> (DIGIT_BIT - 1)) & 1;
y = (int)(buf >> (DIGIT_BIT - 1)) & 1;
buf <<= (mp_digit)1;
/* if the bit is zero and mode == 0 then we ignore it
@@ -3268,7 +3268,7 @@ int s_mp_exptmod (mp_int * G, mp_int * X, mp_int * P, mp_int * Y, int redmode)
}
/* grab the next msb from the exponent */
y = (buf >> (mp_digit)(DIGIT_BIT - 1)) & 1;
y = (int)(buf >> (mp_digit)(DIGIT_BIT - 1)) & 1;
buf <<= (mp_digit)1;
/* if the bit is zero and mode == 0 then we ignore it

View File

@@ -91,7 +91,7 @@ STATIC INLINE word32 ByteReverseWord32(word32 value)
STATIC INLINE void ByteReverseWords(word32* out, const word32* in,
word32 byteCount)
{
word32 count = byteCount/sizeof(word32), i;
word32 count = byteCount/(word32)sizeof(word32), i;
for (i = 0; i < count; i++)
out[i] = ByteReverseWord32(in[i]);
@@ -132,7 +132,7 @@ STATIC INLINE word64 ByteReverseWord64(word64 value)
STATIC INLINE void ByteReverseWords64(word64* out, const word64* in,
word32 byteCount)
{
word32 count = byteCount/sizeof(word64), i;
word32 count = byteCount/(word32)sizeof(word64), i;
for (i = 0; i < count; i++)
out[i] = ByteReverseWord64(in[i]);

View File

@@ -181,7 +181,7 @@ int GenerateSeed(OS_Seed* os, byte* output, word32 sz)
}
while (sz) {
int len = read(os->fd, output, sz);
int len = (int)read(os->fd, output, sz);
if (len == -1) {
ret = READ_RAN_E;
break;

View File

@@ -81,7 +81,7 @@ static const word32 K[64] = {
#define Ch(x,y,z) (z ^ (x & (y ^ z)))
#define Maj(x,y,z) (((x | y) & z) | (x & y))
#define S(x, n) rotrFixed(x, n)
#define R(x, n) (((x)&0xFFFFFFFFL)>>(n))
#define R(x, n) (((x)&0xFFFFFFFFU)>>(n))
#define Sigma0(x) (S(x, 2) ^ S(x, 13) ^ S(x, 22))
#define Sigma1(x) (S(x, 6) ^ S(x, 11) ^ S(x, 25))
#define Gamma0(x) (S(x, 7) ^ S(x, 18) ^ R(x, 3))

View File

@@ -1107,7 +1107,7 @@ static int _fp_exptmod(fp_int * G, fp_int * X, fp_int * P, fp_int * Y)
}
/* grab the next msb from the exponent */
y = (fp_digit)(buf >> (DIGIT_BIT - 1)) & 1;
y = (int)(buf >> (DIGIT_BIT - 1)) & 1;
buf <<= (fp_digit)1;
/* if the bit is zero and mode == 0 then we ignore it