Fix compiler warnings: explicit cast to int in sha256/sha512 modules
This commit is contained in:
parent
e8289618bf
commit
70792d268e
|
@ -274,7 +274,7 @@ sha_update(SHAobject *sha_info, SHA_BYTE *buffer, Py_ssize_t count)
|
||||||
memcpy(((SHA_BYTE *) sha_info->data) + sha_info->local, buffer, i);
|
memcpy(((SHA_BYTE *) sha_info->data) + sha_info->local, buffer, i);
|
||||||
count -= i;
|
count -= i;
|
||||||
buffer += i;
|
buffer += i;
|
||||||
sha_info->local += i;
|
sha_info->local += (int)i;
|
||||||
if (sha_info->local == SHA_BLOCKSIZE) {
|
if (sha_info->local == SHA_BLOCKSIZE) {
|
||||||
sha_transform(sha_info);
|
sha_transform(sha_info);
|
||||||
}
|
}
|
||||||
|
@ -289,7 +289,7 @@ sha_update(SHAobject *sha_info, SHA_BYTE *buffer, Py_ssize_t count)
|
||||||
sha_transform(sha_info);
|
sha_transform(sha_info);
|
||||||
}
|
}
|
||||||
memcpy(sha_info->data, buffer, count);
|
memcpy(sha_info->data, buffer, count);
|
||||||
sha_info->local = count;
|
sha_info->local = (int)count;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* finish computing the SHA digest */
|
/* finish computing the SHA digest */
|
||||||
|
|
|
@ -300,7 +300,7 @@ sha512_update(SHAobject *sha_info, SHA_BYTE *buffer, Py_ssize_t count)
|
||||||
memcpy(((SHA_BYTE *) sha_info->data) + sha_info->local, buffer, i);
|
memcpy(((SHA_BYTE *) sha_info->data) + sha_info->local, buffer, i);
|
||||||
count -= i;
|
count -= i;
|
||||||
buffer += i;
|
buffer += i;
|
||||||
sha_info->local += i;
|
sha_info->local += (int)i;
|
||||||
if (sha_info->local == SHA_BLOCKSIZE) {
|
if (sha_info->local == SHA_BLOCKSIZE) {
|
||||||
sha512_transform(sha_info);
|
sha512_transform(sha_info);
|
||||||
}
|
}
|
||||||
|
@ -315,7 +315,7 @@ sha512_update(SHAobject *sha_info, SHA_BYTE *buffer, Py_ssize_t count)
|
||||||
sha512_transform(sha_info);
|
sha512_transform(sha_info);
|
||||||
}
|
}
|
||||||
memcpy(sha_info->data, buffer, count);
|
memcpy(sha_info->data, buffer, count);
|
||||||
sha_info->local = count;
|
sha_info->local = (int)count;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* finish computing the SHA digest */
|
/* finish computing the SHA digest */
|
||||||
|
|
Loading…
Reference in New Issue