Christian Heimes added the comment: I have an even better solution that gets rid of the warning and the extra memset() call:
diff -r bedce61ae0a0 Modules/_ssl.c --- a/Modules/_ssl.c Tue Sep 13 20:22:02 2016 +0200 +++ b/Modules/_ssl.c Tue Sep 13 20:45:46 2016 +0200 @@ -5073,13 +5073,12 @@ if (_ssl_locks == NULL) { _ssl_locks_count = CRYPTO_num_locks(); - _ssl_locks = PyMem_New(PyThread_type_lock, _ssl_locks_count); + _ssl_locks = PyMem_Calloc(_ssl_locks_count, + sizeof(PyThread_type_lock)); if (_ssl_locks == NULL) { PyErr_NoMemory(); return 0; } - memset(_ssl_locks, 0, - sizeof(PyThread_type_lock) * _ssl_locks_count); for (i = 0; i < _ssl_locks_count; i++) { _ssl_locks[i] = PyThread_allocate_lock(); if (_ssl_locks[i] == NULL) { ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue28118> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com