]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.14] gh-135709: Fix two compile warnings on WASM buildbot (GH-135712) (#135723)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Thu, 19 Jun 2025 16:14:08 +0000 (18:14 +0200)
committerGitHub <noreply@github.com>
Thu, 19 Jun 2025 16:14:08 +0000 (16:14 +0000)
gh-135709: Fix two compile warnings on WASM buildbot (GH-135712)
(cherry picked from commit 9c3c02019cf0bc7792bbdd3a314e45642178e3b5)

Co-authored-by: sobolevn <mail@sobolevn.me>
Modules/_testcapi/long.c
Modules/_testcapimodule.c

index 42243023a45768022a49f7f424b0ea988371f33e..6313abf5485fff1e3c3788c44bb5edd7707e961e 100644 (file)
@@ -228,7 +228,7 @@ pylongwriter_create(PyObject *module, PyObject *args)
             goto error;
         }
 
-        if (num < 0 || num >= PyLong_BASE) {
+        if (num < 0 || num >= (long)PyLong_BASE) {
             PyErr_SetString(PyExc_ValueError, "digit doesn't fit into digit");
             goto error;
         }
index 281c5b41137ac2f0b2687eeb3c74fb1befecce8e..71fffedee146fa3e4c9e04376dabd50c52e5163b 100644 (file)
@@ -2424,7 +2424,7 @@ test_critical_sections(PyObject *module, PyObject *Py_UNUSED(args))
 
 
 // Used by `finalize_thread_hang`.
-#ifdef _POSIX_THREADS
+#if defined(_POSIX_THREADS) && !defined(__wasi__)
 static void finalize_thread_hang_cleanup_callback(void *Py_UNUSED(arg)) {
     // Should not reach here.
     Py_FatalError("pthread thread termination was triggered unexpectedly");