summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorChristian Heimes <christian@cheimes.de>2013-07-31 22:12:06 (GMT)
committerChristian Heimes <christian@cheimes.de>2013-07-31 22:12:06 (GMT)
commitabe639f1150a770b2435417330c1c2a5a2e239ab (patch)
treebea86535db5edc3a07b63fa8375cc696c11b2e42 /Modules
parent6b6a5abc39ab22cba2ba8f01300c76482569335c (diff)
parentb3c872403d0d2b00a1a383190d3e14eb94e84df1 (diff)
downloadcpython-abe639f1150a770b2435417330c1c2a5a2e239ab.zip
cpython-abe639f1150a770b2435417330c1c2a5a2e239ab.tar.gz
cpython-abe639f1150a770b2435417330c1c2a5a2e239ab.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]
Diffstat (limited to 'Modules')
-rw-r--r--Modules/posixmodule.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c
index 1ae04c4..820983c 100644
--- a/Modules/posixmodule.c
+++ b/Modules/posixmodule.c
@@ -4494,6 +4494,7 @@ posix_utime(PyObject *self, PyObject *args, PyObject *kwargs)
memset(&path, 0, sizeof(path));
path.function_name = "utime";
+ memset(&utime, 0, sizeof(utime_t));
#if UTIME_HAVE_FD
path.allow_fd = 1;
#endif