[Python-checkins] bpo-33021: Fix GCC 7 warning (-Wmaybe-uninitialized) in mmapmodule.c (#6117)

Antoine Pitrou webhook-mailer at python.org
Wed Mar 14 16:08:11 EDT 2018


https://github.com/python/cpython/commit/d6e140466142018ddbb7541185348be2b833a2ce
commit: d6e140466142018ddbb7541185348be2b833a2ce
branch: master
author: Zackery Spytz <zspytz at gmail.com>
committer: Antoine Pitrou <pitrou at free.fr>
date: 2018-03-14T21:08:01+01:00
summary:

bpo-33021: Fix GCC 7 warning (-Wmaybe-uninitialized) in mmapmodule.c (#6117)

files:
M Modules/mmapmodule.c

diff --git a/Modules/mmapmodule.c b/Modules/mmapmodule.c
index 6abdc71bbb82..95d42d6dc5e5 100644
--- a/Modules/mmapmodule.c
+++ b/Modules/mmapmodule.c
@@ -1050,7 +1050,7 @@ static PyObject *
 new_mmap_object(PyTypeObject *type, PyObject *args, PyObject *kwdict)
 {
     struct _Py_stat_struct status;
-    int fstat_result;
+    int fstat_result = -1;
     mmap_object *m_obj;
     Py_ssize_t map_size;
     off_t offset = 0;



More information about the Python-checkins mailing list