summaryrefslogtreecommitdiffstats
path: root/Modules/sha256module.c
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2013-05-07 22:00:44 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2013-05-07 22:00:44 (GMT)
commit70792d268eaa8f460ac32d8084171a939f19f14b (patch)
tree2247e0c89cf0e6d724ded908de3d410f77277b13 /Modules/sha256module.c
parente8289618bf13b13449baca38c22dd72ea75b8310 (diff)
downloadcpython-70792d268eaa8f460ac32d8084171a939f19f14b.zip
cpython-70792d268eaa8f460ac32d8084171a939f19f14b.tar.gz
cpython-70792d268eaa8f460ac32d8084171a939f19f14b.tar.bz2
Fix compiler warnings: explicit cast to int in sha256/sha512 modules
Diffstat (limited to 'Modules/sha256module.c')
-rw-r--r--Modules/sha256module.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/sha256module.c b/Modules/sha256module.c
index 3274e7c..767bfac 100644
--- a/Modules/sha256module.c
+++ b/Modules/sha256module.c
@@ -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);
count -= i;
buffer += i;
- sha_info->local += i;
+ sha_info->local += (int)i;
if (sha_info->local == SHA_BLOCKSIZE) {
sha_transform(sha_info);
}
@@ -289,7 +289,7 @@ sha_update(SHAobject *sha_info, SHA_BYTE *buffer, Py_ssize_t count)
sha_transform(sha_info);
}
memcpy(sha_info->data, buffer, count);
- sha_info->local = count;
+ sha_info->local = (int)count;
}
/* finish computing the SHA digest */