summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Heimes <christian@cheimes.de>2013-07-31 22:08:16 (GMT)
committerChristian Heimes <christian@cheimes.de>2013-07-31 22:08:16 (GMT)
commitb3c872403d0d2b00a1a383190d3e14eb94e84df1 (patch)
tree89300d31d4a375527235c280fbcda4448394589b
parent294b93d4c6d1dc781e3e63d05652900183bef50c (diff)
downloadcpython-b3c872403d0d2b00a1a383190d3e14eb94e84df1.zip
cpython-b3c872403d0d2b00a1a383190d3e14eb94e84df1.tar.gz
cpython-b3c872403d0d2b00a1a383190d3e14eb94e84df1.tar.bz2
Initialize utime with 0. It fixes a couple of compiler warnung:
warning: 'utime.mtime_ns' may be used uninitialized in this function [-Wmaybe-uninitialized]
-rw-r--r--Modules/posixmodule.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c
index 5f5c85e..1ca12f3 100644
--- a/Modules/posixmodule.c
+++ b/Modules/posixmodule.c
@@ -4751,6 +4751,7 @@ posix_utime(PyObject *self, PyObject *args, PyObject *kwargs)
PyObject *return_value = NULL;
memset(&path, 0, sizeof(path));
+ memset(&utime, 0, sizeof(utime_t));
#if UTIME_HAVE_FD
path.allow_fd = 1;
#endif