]> granicus.if.org Git - python/commitdiff
Initialize utime with 0. It fixes a couple of compiler warnung:
authorChristian Heimes <christian@cheimes.de>
Wed, 31 Jul 2013 22:08:16 +0000 (00:08 +0200)
committerChristian Heimes <christian@cheimes.de>
Wed, 31 Jul 2013 22:08:16 +0000 (00:08 +0200)
    warning: 'utime.mtime_ns' may be used uninitialized in this function [-Wmaybe-uninitialized]

Modules/posixmodule.c

index 5f5c85e8d9e3a06e27c0a92a29acc9c270b37c59..1ca12f3c70e5fb589ae6db9233dabde22c13d1eb 100644 (file)
@@ -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