summaryrefslogtreecommitdiffstats
path: root/Modules/_blake2
diff options
context:
space:
mode:
authorChristian Heimes <christian@python.org>2016-09-07 09:39:21 (GMT)
committerChristian Heimes <christian@python.org>2016-09-07 09:39:21 (GMT)
commitdfb9ef13575bcc457544b408fc4e5eca3c5ed9b1 (patch)
treee7ef77c0e70a7120bd3a38ab451fe5b6c40c4f06 /Modules/_blake2
parent680cb152c5d220a74321fa905d4fc91bdec40fbb (diff)
downloadcpython-dfb9ef13575bcc457544b408fc4e5eca3c5ed9b1.zip
cpython-dfb9ef13575bcc457544b408fc4e5eca3c5ed9b1.tar.gz
cpython-dfb9ef13575bcc457544b408fc4e5eca3c5ed9b1.tar.bz2
blake2: silence two more warnings on platforms with size_t < uint64_t. Don't use SSE2 when cross-compiling
Diffstat (limited to 'Modules/_blake2')
-rw-r--r--Modules/_blake2/impl/blake2b-ref.c4
-rw-r--r--Modules/_blake2/impl/blake2s-ref.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/Modules/_blake2/impl/blake2b-ref.c b/Modules/_blake2/impl/blake2b-ref.c
index 7c1301b..ec775b4 100644
--- a/Modules/_blake2/impl/blake2b-ref.c
+++ b/Modules/_blake2/impl/blake2b-ref.c
@@ -307,8 +307,8 @@ int blake2b_update( blake2b_state *S, const uint8_t *in, uint64_t inlen )
}
else /* inlen <= fill */
{
- memcpy( S->buf + left, in, inlen );
- S->buflen += inlen; /* Be lazy, do not compress */
+ memcpy( S->buf + left, in, (size_t)inlen );
+ S->buflen += (size_t)inlen; /* Be lazy, do not compress */
in += inlen;
inlen -= inlen;
}
diff --git a/Modules/_blake2/impl/blake2s-ref.c b/Modules/_blake2/impl/blake2s-ref.c
index b90e8ef..b08e72b 100644
--- a/Modules/_blake2/impl/blake2s-ref.c
+++ b/Modules/_blake2/impl/blake2s-ref.c
@@ -298,8 +298,8 @@ int blake2s_update( blake2s_state *S, const uint8_t *in, uint64_t inlen )
}
else /* inlen <= fill */
{
- memcpy( S->buf + left, in, inlen );
- S->buflen += inlen; /* Be lazy, do not compress */
+ memcpy( S->buf + left, in, (size_t)inlen );
+ S->buflen += (size_t)inlen; /* Be lazy, do not compress */
in += inlen;
inlen -= inlen;
}