Skip to content

Commit 3df2022

Browse files
authored
gh-120586: Fix several "unused function" warnings in posixmodule.c (#120588)
1 parent bac4eda commit 3df2022

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
@@ -7873,6 +7873,7 @@ os_register_at_fork_impl(PyObject *module, PyObject *before,
78737873
}
78747874
#endif /* HAVE_FORK */
78757875

7876+
#if defined(HAVE_FORK1) || defined(HAVE_FORKPTY) || defined(HAVE_FORK)
78767877
// Common code to raise a warning if we detect there is more than one thread
78777878
// running in the process. Best effort, silent if unable to count threads.
78787879
// Constraint: Quick. Never overcounts. Never leaves an error set.
@@ -7976,6 +7977,7 @@ warn_about_fork_with_threads(const char* name)
79767977
PyErr_Clear();
79777978
}
79787979
}
7980+
#endif // HAVE_FORK1 || HAVE_FORKPTY || HAVE_FORK
79797981

79807982
#ifdef HAVE_FORK1
79817983
/*[clinic input]
@@ -12541,6 +12543,7 @@ os_mknod_impl(PyObject *module, path_t *path, int mode, dev_t device,
1254112543
#endif /* defined(HAVE_MKNOD) && defined(HAVE_MAKEDEV) */
1254212544

1254312545

12546+
#ifdef HAVE_DEVICE_MACROS
1254412547
static PyObject *
1254512548
major_minor_conv(unsigned int value)
1254612549
{
@@ -12563,7 +12566,6 @@ major_minor_check(dev_t value)
1256312566
return (dev_t)(unsigned int)value == value;
1256412567
}
1256512568

12566-
#ifdef HAVE_DEVICE_MACROS
1256712569
/*[clinic input]
1256812570
os.major
1256912571

0 commit comments

Comments
 (0)