Skip to content

Commit 65c0086

Browse files
Fix unused variable warning
1 parent 345ffd3 commit 65c0086

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Modules/_io/fileio.c

+2
Original file line numberDiff line numberDiff line change
@@ -240,8 +240,10 @@ _io_FileIO___init___impl(fileio *self, PyObject *nameobj, const char *mode,
240240
int fstat_result;
241241
int async_err = 0;
242242

243+
#ifdef NDEBUG
243244
_PyIO_State *state = find_io_state_by_def(Py_TYPE(self));
244245
assert(PyFileIO_Check(state, self));
246+
#endif
245247
if (self->fd >= 0) {
246248
if (self->closefd) {
247249
/* Have to close the existing file first. */

0 commit comments

Comments
 (0)