Skip to content

Commit 7b95d23

Browse files
authored
Fix unused functions warnings in instrumentation.c (GH-103515)
1 parent a6f9594 commit 7b95d23

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Python/instrumentation.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@ is_instrumented(int opcode) {
125125
return opcode >= MIN_INSTRUMENTED_OPCODE;
126126
}
127127

128+
#ifndef NDEBUG
128129
static inline bool
129130
monitors_equals(_Py_Monitors a, _Py_Monitors b)
130131
{
@@ -135,6 +136,7 @@ monitors_equals(_Py_Monitors a, _Py_Monitors b)
135136
}
136137
return true;
137138
}
139+
#endif
138140

139141
static inline _Py_Monitors
140142
monitors_sub(_Py_Monitors a, _Py_Monitors b)
@@ -146,6 +148,7 @@ monitors_sub(_Py_Monitors a, _Py_Monitors b)
146148
return res;
147149
}
148150

151+
#ifndef NDEBUG
149152
static inline _Py_Monitors
150153
monitors_and(_Py_Monitors a, _Py_Monitors b)
151154
{
@@ -155,6 +158,7 @@ monitors_and(_Py_Monitors a, _Py_Monitors b)
155158
}
156159
return res;
157160
}
161+
#endif
158162

159163
static inline _Py_Monitors
160164
monitors_or(_Py_Monitors a, _Py_Monitors b)

0 commit comments

Comments
 (0)