changeset: 103401:801634d3c105 user: Steve Dower date: Fri Sep 09 09:03:15 2016 -0700 files: Modules/posixmodule.c description: Issue #27781: Fixes uninitialized fd when !MS_WINDOWS and !HAVE_OPENAT diff -r 4e80a157ea66 -r 801634d3c105 Modules/posixmodule.c --- a/Modules/posixmodule.c Fri Sep 09 08:56:37 2016 -0700 +++ b/Modules/posixmodule.c Fri Sep 09 09:03:15 2016 -0700 @@ -7477,13 +7477,14 @@ Py_BEGIN_ALLOW_THREADS #ifdef MS_WINDOWS fd = _wopen(path->wide, flags, mode); -#endif +#else #ifdef HAVE_OPENAT if (dir_fd != DEFAULT_DIR_FD) fd = openat(dir_fd, path->narrow, flags, mode); else +#endif /* HAVE_OPENAT */ fd = open(path->narrow, flags, mode); -#endif +#endif /* !MS_WINDOWS */ Py_END_ALLOW_THREADS } while (fd < 0 && errno == EINTR && !(async_err = PyErr_CheckSignals())); _Py_END_SUPPRESS_IPH