]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-114286: Fix `maybe-uninitialized` warning in `Modules/_io/fileio.c` (GH-114287)
authorNikita Sobolev <mail@sobolevn.me>
Fri, 19 Jan 2024 10:25:05 +0000 (13:25 +0300)
committerGitHub <noreply@github.com>
Fri, 19 Jan 2024 10:25:05 +0000 (10:25 +0000)
Modules/_io/fileio.c

index af4375c3640679002f4d88672fa02f623d5d6d33..9cf268ca0b26c81a809ee1607711a6674f42798f 100644 (file)
@@ -157,7 +157,7 @@ _io_FileIO_close_impl(fileio *self, PyTypeObject *cls)
         return res;
     }
 
-    PyObject *exc;
+    PyObject *exc = NULL;
     if (res == NULL) {
         exc = PyErr_GetRaisedException();
     }