From: Nikita Sobolev Date: Sun, 16 Jun 2024 17:13:56 +0000 (+0300) Subject: gh-120584: Fix "unused thread_critical_sections" warning in `test_critical_sections... X-Git-Tag: v3.14.0a1~1474 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b337aefd3e44f5c8e38cd282273359d07cce6126;p=thirdparty%2FPython%2Fcpython.git gh-120584: Fix "unused thread_critical_sections" warning in `test_critical_sections` (#120585) --- diff --git a/Modules/_testinternalcapi/test_critical_sections.c b/Modules/_testinternalcapi/test_critical_sections.c index 1c0e049efafc..0129bd49ca93 100644 --- a/Modules/_testinternalcapi/test_critical_sections.c +++ b/Modules/_testinternalcapi/test_critical_sections.c @@ -130,6 +130,7 @@ test_critical_sections_suspend(PyObject *self, PyObject *Py_UNUSED(args)) Py_RETURN_NONE; } +#ifdef Py_CAN_START_THREADS struct test_data { PyObject *obj1; PyObject *obj2; @@ -170,7 +171,6 @@ thread_critical_sections(void *arg) } } -#ifdef Py_CAN_START_THREADS static PyObject * test_critical_sections_threads(PyObject *self, PyObject *Py_UNUSED(args)) {