]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-132674: fix `_hashopenssl.c` compiler warnings on free-threaded build (#132675)
authorBénédikt Tran <10796600+picnixz@users.noreply.github.com>
Fri, 18 Apr 2025 11:52:17 +0000 (13:52 +0200)
committerGitHub <noreply@github.com>
Fri, 18 Apr 2025 11:52:17 +0000 (13:52 +0200)
Modules/_hashopenssl.c

index 08f5c0ece0a18cac489f0d65f86e0d9ba02af5da..756a8b70931baa047596bb5c9a61b714cc7a38bd 100644 (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