diff options
author | Andy Polyakov <appro@openssl.org> | 2008-12-29 12:35:49 +0000 |
---|---|---|
committer | Andy Polyakov <appro@openssl.org> | 2008-12-29 12:35:49 +0000 |
commit | 5cabcf96e77bcf6d23bfb3ec32c9ea37100578c6 (patch) | |
tree | 2c2e0f123d4bc953e75e9919488c92b78b5c75b4 /crypto/evp | |
parent | 85e878f224f16d21c09b1916c72ba0458335df7b (diff) |
Fix "possible loss of data" Win64 compiler warnings.
Diffstat (limited to 'crypto/evp')
-rw-r--r-- | crypto/evp/e_des.c | 3 | ||||
-rw-r--r-- | crypto/evp/e_des3.c | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/crypto/evp/e_des.c b/crypto/evp/e_des.c index 1e4230493b..ca009f2c52 100644 --- a/crypto/evp/e_des.c +++ b/crypto/evp/e_des.c @@ -147,7 +147,8 @@ static int des_cfb1_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, c[0]=(in[n/8]&(1 << (7-n%8))) ? 0x80 : 0; DES_cfb_encrypt(c,d,1,1,ctx->cipher_data,(DES_cblock *)ctx->iv, ctx->encrypt); - out[n/8]=(out[n/8]&~(0x80 >> (n%8)))|((d[0]&0x80) >> (n%8)); + out[n/8]=(out[n/8]&~(0x80 >> (unsigned int)(n%8))) | + ((d[0]&0x80) >> (unsigned int)(n%8)); } inl-=chunk; in +=chunk; diff --git a/crypto/evp/e_des3.c b/crypto/evp/e_des3.c index 059ad77118..3232cfe024 100644 --- a/crypto/evp/e_des3.c +++ b/crypto/evp/e_des3.c @@ -179,7 +179,8 @@ static int des_ede3_cfb1_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, DES_ede3_cfb_encrypt(c,d,1,1, &data(ctx)->ks1,&data(ctx)->ks2,&data(ctx)->ks3, (DES_cblock *)ctx->iv,ctx->encrypt); - out[n/8]=(out[n/8]&~(0x80 >> (n%8)))|((d[0]&0x80) >> (n%8)); + out[n/8]=(out[n/8]&~(0x80 >> (unsigned int)(n%8))) | + ((d[0]&0x80) >> (unsigned int)(n%8)); } return 1; |