Skip to content

Commit 08a8af6

Browse files
committed
Remove unused variables.
1 parent 531928e commit 08a8af6

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

Modules/_testcapimodule.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2607,7 +2607,6 @@ test_interpreter_refs(PyObject *self, PyObject *unused)
26072607
static PyObject *
26082608
test_thread_state_ensure_nested(PyObject *self, PyObject *unused)
26092609
{
2610-
PyInterpreterState *interp = PyInterpreterState_Get();
26112610
PyThreadState *save_tstate = PyThreadState_Swap(NULL);
26122611
assert(PyGILState_GetThisThreadState() == save_tstate);
26132612
PyInterpreterRef ref = get_strong_ref();
@@ -2647,6 +2646,7 @@ test_thread_state_ensure_nested(PyObject *self, PyObject *unused)
26472646

26482647
assert(PyThreadState_GetUnchecked() == NULL);
26492648
PyInterpreterRef_Close(ref);
2649+
Py_RETURN_NONE;
26502650
}
26512651

26522652
static PyMethodDef TestMethods[] = {

Modules/_testinternalcapi.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2352,6 +2352,8 @@ test_interp_refcount(PyObject *self, PyObject *unused)
23522352
PyInterpreterRef refs[NUM_REFS];
23532353
for (int i = 0; i < NUM_REFS; ++i) {
23542354
int res = PyInterpreterRef_Get(&refs[i]);
2355+
(void)res;
2356+
assert(res == 0);
23552357
assert(_PyInterpreterState_Refcount(interp) == i + 1);
23562358
}
23572359

@@ -2377,6 +2379,7 @@ test_interp_weakref_incref(PyObject *self, PyObject *unused)
23772379

23782380
for (int i = 0; i < NUM_REFS; ++i) {
23792381
int res = PyInterpreterWeakRef_AsStrong(wref, &refs[i]);
2382+
(void)res;
23802383
assert(res == 0);
23812384
assert(PyInterpreterRef_AsInterpreter(refs[i]) == interp);
23822385
assert(_PyInterpreterState_Refcount(interp) == i + 1);

0 commit comments

Comments
 (0)