Skip to content

Commit 2df0f88

Browse files
authored
gh-132674: fix _hashopenssl.c compiler warnings on free-threaded build (#132675)
1 parent 3793526 commit 2df0f88

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Modules/_hashopenssl.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -413,7 +413,7 @@ py_digest_by_name(PyObject *module, const char *name, enum Py_hash_type py_ht)
413413
digest = PY_EVP_MD_fetch(entry->ossl_name, NULL);
414414
#ifdef Py_GIL_DISABLED
415415
// exchange just in case another thread did same thing at same time
416-
other_digest = _Py_atomic_exchange_ptr(&entry->evp, digest);
416+
other_digest = _Py_atomic_exchange_ptr(&entry->evp, (void *)digest);
417417
#else
418418
entry->evp = digest;
419419
#endif
@@ -425,7 +425,7 @@ py_digest_by_name(PyObject *module, const char *name, enum Py_hash_type py_ht)
425425
digest = PY_EVP_MD_fetch(entry->ossl_name, "-fips");
426426
#ifdef Py_GIL_DISABLED
427427
// exchange just in case another thread did same thing at same time
428-
other_digest = _Py_atomic_exchange_ptr(&entry->evp_nosecurity, digest);
428+
other_digest = _Py_atomic_exchange_ptr(&entry->evp_nosecurity, (void *)digest);
429429
#else
430430
entry->evp_nosecurity = digest;
431431
#endif

0 commit comments

Comments
 (0)