]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-135709: Fix two compile warnings on WASM buildbot (#135712)
authorsobolevn <mail@sobolevn.me>
Thu, 19 Jun 2025 15:46:40 +0000 (18:46 +0300)
committerGitHub <noreply@github.com>
Thu, 19 Jun 2025 15:46:40 +0000 (18:46 +0300)
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");