Skip to content

Commit e004914

Browse files
[3.12] gh-120586: Fix several "unused function" warnings in posixmodule.c (GH-120588) (#120617)
gh-120586: Fix several "unused function" warnings in `posixmodule.c` (GH-120588) (cherry picked from commit 3df2022) Co-authored-by: Nikita Sobolev <[email protected]>
1 parent 40ce124 commit e004914

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Modules/posixmodule.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7579,6 +7579,7 @@ os_register_at_fork_impl(PyObject *module, PyObject *before,
75797579
}
75807580
#endif /* HAVE_FORK */
75817581

7582+
#if defined(HAVE_FORK1) || defined(HAVE_FORKPTY) || defined(HAVE_FORK)
75827583
// Common code to raise a warning if we detect there is more than one thread
75837584
// running in the process. Best effort, silent if unable to count threads.
75847585
// Constraint: Quick. Never overcounts. Never leaves an error set.
@@ -7677,6 +7678,7 @@ static void warn_about_fork_with_threads(const char* name) {
76777678
PyErr_Clear();
76787679
}
76797680
}
7681+
#endif // HAVE_FORK1 || HAVE_FORKPTY || HAVE_FORK
76807682

76817683
#ifdef HAVE_FORK1
76827684
/*[clinic input]
@@ -11783,6 +11785,7 @@ os_mknod_impl(PyObject *module, path_t *path, int mode, dev_t device,
1178311785
#endif /* defined(HAVE_MKNOD) && defined(HAVE_MAKEDEV) */
1178411786

1178511787

11788+
#ifdef HAVE_DEVICE_MACROS
1178611789
static PyObject *
1178711790
major_minor_conv(unsigned int value)
1178811791
{
@@ -11805,7 +11808,6 @@ major_minor_check(dev_t value)
1180511808
return (dev_t)(unsigned int)value == value;
1180611809
}
1180711810

11808-
#ifdef HAVE_DEVICE_MACROS
1180911811
/*[clinic input]
1181011812
os.major
1181111813

0 commit comments

Comments
 (0)