From: Christian Heimes Date: Wed, 7 Sep 2016 00:49:11 +0000 (+0200) Subject: Silence two warnings in blake2. key_length is between 0 and 64 (block size). X-Git-Tag: v3.6.0b1~375 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=cc554b65f18d7585203e5f225cfcbe3c04f1359b;p=thirdparty%2FPython%2Fcpython.git Silence two warnings in blake2. key_length is between 0 and 64 (block size). --- diff --git a/Modules/_blake2/blake2b_impl.c b/Modules/_blake2/blake2b_impl.c index 1c67744f7585..9c3d8f54d531 100644 --- a/Modules/_blake2/blake2b_impl.c +++ b/Modules/_blake2/blake2b_impl.c @@ -208,7 +208,7 @@ py_blake2b_new_impl(PyTypeObject *type, PyObject *data, int digest_size, 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 index 8b38270ae837..53c22c2a9bde 100644 --- a/Modules/_blake2/blake2s_impl.c +++ b/Modules/_blake2/blake2s_impl.c @@ -208,7 +208,7 @@ py_blake2s_new_impl(PyTypeObject *type, PyObject *data, int digest_size, BLAKE2S_KEYBYTES); goto error; } - self->param.key_length = key->len; + self->param.key_length = (uint8_t)key->len; } /* Initialize hash state. */