mirror of https://github.com/python/cpython
Initialize utime with 0. It fixes a couple of compiler warnung:
warning: 'utime.mtime_ns' may be used uninitialized in this function [-Wmaybe-uninitialized]
This commit is contained in:
parent
294b93d4c6
commit
b3c872403d
|
@ -4751,6 +4751,7 @@ posix_utime(PyObject *self, PyObject *args, PyObject *kwargs)
|
||||||
PyObject *return_value = NULL;
|
PyObject *return_value = NULL;
|
||||||
|
|
||||||
memset(&path, 0, sizeof(path));
|
memset(&path, 0, sizeof(path));
|
||||||
|
memset(&utime, 0, sizeof(utime_t));
|
||||||
#if UTIME_HAVE_FD
|
#if UTIME_HAVE_FD
|
||||||
path.allow_fd = 1;
|
path.allow_fd = 1;
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue