]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.13] gh-132674: fix `_hashopenssl.c` compiler warnings on free-threaded build ...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Fri, 18 Apr 2025 12:17:36 +0000 (14:17 +0200)
committerGitHub <noreply@github.com>
Fri, 18 Apr 2025 12:17:36 +0000 (12:17 +0000)
gh-132674: fix `_hashopenssl.c` compiler warnings on free-threaded build (GH-132675)
(cherry picked from commit 2df0f8804701cc17674e5b4e90499e9fac71d0e1)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Modules/_hashopenssl.c

index d569b5048669d17f5f6f110ebfb2d5ddcb45a5e6..b2a5754e774030addc80f0dee295037939bcac0a 100644 (file)
@@ -410,7 +410,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
@@ -422,7 +422,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