summaryrefslogtreecommitdiff
path: root/Modules/_blake2
diff options
context:
space:
mode:
authorChristian Heimes <christian@python.org>2016-09-07 11:39:21 +0200
committerChristian Heimes <christian@python.org>2016-09-07 11:39:21 +0200
commitdfb9ef13575bcc457544b408fc4e5eca3c5ed9b1 (patch)
treee7ef77c0e70a7120bd3a38ab451fe5b6c40c4f06 /Modules/_blake2
parent680cb152c5d220a74321fa905d4fc91bdec40fbb (diff)
downloadcpython-git-dfb9ef13575bcc457544b408fc4e5eca3c5ed9b1.tar.gz
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 7c1301bef6..ec775b4d4b 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 b90e8efc4e..b08e72b737 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;
}