diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2017-09-14 08:10:30 (GMT) |
---|---|---|
committer | Christian Heimes <christian@python.org> | 2017-09-14 08:10:30 (GMT) |
commit | 5a61559fb0776a9a0f08294ec9003cea13940430 (patch) | |
tree | c76e9b309957db45ac046a6d15c38bd2e6c068d9 /Modules | |
parent | dae0276bb6bc7281d59fb0b8f1aab31634ee80dc (diff) | |
download | cpython-5a61559fb0776a9a0f08294ec9003cea13940430.zip cpython-5a61559fb0776a9a0f08294ec9003cea13940430.tar.gz cpython-5a61559fb0776a9a0f08294ec9003cea13940430.tar.bz2 |
_ssl_: Fix compiler warning (#3559)
Cast Py_buffer.len (Py_ssize_t, signed) to size_t (unsigned) to
prevent the following warning:
Modules/_ssl.c:3089:21: warning: comparison between signed and
unsigned integer expressions [-Wsign-compare]
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/_ssl.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/_ssl.c b/Modules/_ssl.c index bd22f16..8aaaa32 100644 --- a/Modules/_ssl.c +++ b/Modules/_ssl.c @@ -3086,7 +3086,7 @@ _ssl__SSLContext__set_alpn_protocols_impl(PySSLContext *self, /*[clinic end generated code: output=87599a7f76651a9b input=9bba964595d519be]*/ { #ifdef HAVE_ALPN - if (protos->len > UINT_MAX) { + if ((size_t)protos->len > UINT_MAX) { PyErr_Format(PyExc_OverflowError, "protocols longer than %d bytes", UINT_MAX); return NULL; |