]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Fix unused functions warnings in instrumentation.c (GH-103515)
authorBenjamin Peterson <benjamin@python.org>
Thu, 13 Apr 2023 17:45:03 +0000 (12:45 -0500)
committerGitHub <noreply@github.com>
Thu, 13 Apr 2023 17:45:03 +0000 (18:45 +0100)
Python/instrumentation.c

index 8dc8b01fcb0496f320508a0eeb0fc033850908fb..853e8a10e81463d10829e622a5cdc9948424f166 100644 (file)
@@ -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)
 {
@@ -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)
@@ -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)
 {
@@ -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)