[Python-checkins] cpython: Silence two warnings in blake2. key_length is between 0 and 64 (block size).
christian.heimes
python-checkins at python.org
Tue Sep 6 20:49:18 EDT 2016
https://hg.python.org/cpython/rev/9e97d985cee8
changeset: 103187:9e97d985cee8
user: Christian Heimes <christian at python.org>
date: Wed Sep 07 02:49:11 2016 +0200
summary:
Silence two warnings in blake2. key_length is between 0 and 64 (block size).
files:
Modules/_blake2/blake2b_impl.c | 2 +-
Modules/_blake2/blake2s_impl.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/Modules/_blake2/blake2b_impl.c b/Modules/_blake2/blake2b_impl.c
--- a/Modules/_blake2/blake2b_impl.c
+++ b/Modules/_blake2/blake2b_impl.c
@@ -208,7 +208,7 @@
BLAKE2B_KEYBYTES);
goto error;
}
- self->param.key_length = key->len;
+ self->param.key_length = (uint8_t)key->len;
}
/* Initialize hash state. */
diff --git a/Modules/_blake2/blake2s_impl.c b/Modules/_blake2/blake2s_impl.c
--- a/Modules/_blake2/blake2s_impl.c
+++ b/Modules/_blake2/blake2s_impl.c
@@ -208,7 +208,7 @@
BLAKE2S_KEYBYTES);
goto error;
}
- self->param.key_length = key->len;
+ self->param.key_length = (uint8_t)key->len;
}
/* Initialize hash state. */
--
Repository URL: https://hg.python.org/cpython
More information about the Python-checkins
mailing list