gh-132674: fix _hashopenssl.c compiler warnings on free-threaded build (#132675)

This commit is contained in:
Bénédikt Tran 2025-04-18 13:52:17 +02:00 committed by GitHub
parent 379352620c
commit 2df0f88047
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -413,7 +413,7 @@ py_digest_by_name(PyObject *module, const char *name, enum Py_hash_type py_ht)
digest = PY_EVP_MD_fetch(entry->ossl_name, NULL);
#ifdef Py_GIL_DISABLED
// exchange just in case another thread did same thing at same time
other_digest = _Py_atomic_exchange_ptr(&entry->evp, digest);
other_digest = _Py_atomic_exchange_ptr(&entry->evp, (void *)digest);
#else
entry->evp = digest;
#endif
@ -425,7 +425,7 @@ py_digest_by_name(PyObject *module, const char *name, enum Py_hash_type py_ht)
digest = PY_EVP_MD_fetch(entry->ossl_name, "-fips");
#ifdef Py_GIL_DISABLED
// exchange just in case another thread did same thing at same time
other_digest = _Py_atomic_exchange_ptr(&entry->evp_nosecurity, digest);
other_digest = _Py_atomic_exchange_ptr(&entry->evp_nosecurity, (void *)digest);
#else
entry->evp_nosecurity = digest;
#endif