Skip to content

[3.12] gh-120586: Fix several "unused function" warnings in posixmodule.c (GH-120588) #120617

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 17, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion Modules/posixmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -7579,6 +7579,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.
Expand Down Expand Up @@ -7677,6 +7678,7 @@ static void warn_about_fork_with_threads(const char* name) {
PyErr_Clear();
}
}
#endif // HAVE_FORK1 || HAVE_FORKPTY || HAVE_FORK

#ifdef HAVE_FORK1
/*[clinic input]
Expand Down Expand Up @@ -11783,6 +11785,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)
{
Expand All @@ -11805,7 +11808,6 @@ major_minor_check(dev_t value)
return (dev_t)(unsigned int)value == value;
}

#ifdef HAVE_DEVICE_MACROS
/*[clinic input]
os.major

Expand Down
Loading