summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2024-06-17 07:09:11 (GMT)
committerGitHub <noreply@github.com>2024-06-17 07:09:11 (GMT)
commit03b89e3a3d155a06827f58d51238a731d8800cc9 (patch)
tree30e5463544c77e9697243a0985b604a81ab00058 /Modules
parent3b28e430edfb60964fb3a34d2971d21a9200a4f9 (diff)
downloadcpython-03b89e3a3d155a06827f58d51238a731d8800cc9.zip
cpython-03b89e3a3d155a06827f58d51238a731d8800cc9.tar.gz
cpython-03b89e3a3d155a06827f58d51238a731d8800cc9.tar.bz2
[3.13] gh-120586: Fix several "unused function" warnings in `posixmodule.c` (GH-120588) (#120616)
gh-120586: Fix several "unused function" warnings in `posixmodule.c` (GH-120588) (cherry picked from commit 3df2022931f77c5cadb3f51b371be6ae17587ede) Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Diffstat (limited to 'Modules')
-rw-r--r--Modules/posixmodule.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c
index 5f943d4..f85fab3 100644
--- a/Modules/posixmodule.c
+++ b/Modules/posixmodule.c
@@ -7873,6 +7873,7 @@ os_register_at_fork_impl(PyObject *module, PyObject *before,
}
#endif /* HAVE_FORK */
+#if defined(HAVE_FORK1) || defined(HAVE_FORKPTY) || defined(HAVE_FORK)
// Common code to raise a warning if we detect there is more than one thread
// running in the process. Best effort, silent if unable to count threads.
// Constraint: Quick. Never overcounts. Never leaves an error set.
@@ -7976,6 +7977,7 @@ warn_about_fork_with_threads(const char* name)
PyErr_Clear();
}
}
+#endif // HAVE_FORK1 || HAVE_FORKPTY || HAVE_FORK
#ifdef HAVE_FORK1
/*[clinic input]
@@ -12541,6 +12543,7 @@ os_mknod_impl(PyObject *module, path_t *path, int mode, dev_t device,
#endif /* defined(HAVE_MKNOD) && defined(HAVE_MAKEDEV) */
+#ifdef HAVE_DEVICE_MACROS
static PyObject *
major_minor_conv(unsigned int value)
{
@@ -12563,7 +12566,6 @@ major_minor_check(dev_t value)
return (dev_t)(unsigned int)value == value;
}
-#ifdef HAVE_DEVICE_MACROS
/*[clinic input]
os.major