Skip to content

Fix unused functions warnings in instrumentation.c. #103515

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
Apr 13, 2023
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: 4 additions & 0 deletions Python/instrumentation.c
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ is_instrumented(int opcode) {
return opcode >= MIN_INSTRUMENTED_OPCODE;
}

#ifndef NDEBUG
static inline bool
monitors_equals(_Py_Monitors a, _Py_Monitors b)
{
Expand All @@ -135,6 +136,7 @@ monitors_equals(_Py_Monitors a, _Py_Monitors b)
}
return true;
}
#endif

static inline _Py_Monitors
monitors_sub(_Py_Monitors a, _Py_Monitors b)
Expand All @@ -146,6 +148,7 @@ monitors_sub(_Py_Monitors a, _Py_Monitors b)
return res;
}

#ifndef NDEBUG
static inline _Py_Monitors
monitors_and(_Py_Monitors a, _Py_Monitors b)
{
Expand All @@ -155,6 +158,7 @@ monitors_and(_Py_Monitors a, _Py_Monitors b)
}
return res;
}
#endif

static inline _Py_Monitors
monitors_or(_Py_Monitors a, _Py_Monitors b)
Expand Down