summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorunknown <peter@linux.local>2002-06-23 22:50:22 +0400
committerunknown <peter@linux.local>2002-06-23 22:50:22 +0400
commit1364569b88c3f5d228437c02e59ae5d5693a8b38 (patch)
tree935699cef2cd262c4cfa456e6c8ccb5a7a563368
parent374ddd5774bbe74168c6bbf95ebc21a799b2118f (diff)
downloadmariadb-git-1364569b88c3f5d228437c02e59ae5d5693a8b38.tar.gz
Fix some warning issued by Windows Compiler
mysys/sha1.c: Fix Warning messages
-rw-r--r--mysys/sha1.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/mysys/sha1.c b/mysys/sha1.c
index 3b4bac84d08..5271b369b6c 100644
--- a/mysys/sha1.c
+++ b/mysys/sha1.c
@@ -155,8 +155,8 @@ int sha1_result(SHA1_CONTEXT *context,
}
for (i = 0; i < SHA1_HASH_SIZE; i++)
- Message_Digest[i] = (context->Intermediate_Hash[i>>2] >> 8
- * ( 3 - ( i & 0x03 ) ));
+ Message_Digest[i] = (int8)((context->Intermediate_Hash[i>>2] >> 8
+ * ( 3 - ( i & 0x03 ) )));
return SHA_SUCCESS;
}
@@ -379,14 +379,14 @@ void SHA1PadMessage(SHA1_CONTEXT *context)
Store the message length as the last 8 octets
*/
- context->Message_Block[56] = context->Length >> 56;
- context->Message_Block[57] = context->Length >> 48;
- context->Message_Block[58] = context->Length >> 40;
- context->Message_Block[59] = context->Length >> 32;
- context->Message_Block[60] = context->Length >> 24;
- context->Message_Block[61] = context->Length >> 16;
- context->Message_Block[62] = context->Length >> 8;
- context->Message_Block[63] = context->Length;
+ context->Message_Block[56] = (int8) (context->Length >> 56);
+ context->Message_Block[57] = (int8) (context->Length >> 48);
+ context->Message_Block[58] = (int8) (context->Length >> 40);
+ context->Message_Block[59] = (int8) (context->Length >> 32);
+ context->Message_Block[60] = (int8) (context->Length >> 24);
+ context->Message_Block[61] = (int8) (context->Length >> 16);
+ context->Message_Block[62] = (int8) (context->Length >> 8);
+ context->Message_Block[63] = (int8) (context->Length);
SHA1ProcessMessageBlock(context);
}