]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-111684: Avoid a Compiler Warning (gh-111706)
authorEric Snow <ericsnowcurrently@gmail.com>
Fri, 3 Nov 2023 19:37:10 +0000 (13:37 -0600)
committerGitHub <noreply@github.com>
Fri, 3 Nov 2023 19:37:10 +0000 (13:37 -0600)
Python/crossinterp.c

index caca8073fc3c3e2ab15af4ee11ffcdb92a92359b..a65355a49c5252baa1005ed971bbc67e58794158 100644 (file)
@@ -1320,7 +1320,9 @@ _PyXI_NamespaceFromNames(PyObject *names)
     return ns;
 }
 
+#ifndef NDEBUG
 static int _session_is_active(_PyXI_session *);
+#endif
 static void _propagate_not_shareable_error(_PyXI_session *);
 
 int
@@ -1468,11 +1470,13 @@ _exit_session(_PyXI_session *session)
     session->init_tstate = NULL;
 }
 
+#ifndef NDEBUG
 static int
 _session_is_active(_PyXI_session *session)
 {
     return (session->init_tstate != NULL);
 }
+#endif
 
 static void
 _propagate_not_shareable_error(_PyXI_session *session)