8000 Initialize utime with 0. It fixes a couple of compiler warnung: · python/cpython@b3c8724 · GitHub
[go: up one dir, main page]

Skip to content

Commit b3c8724

Browse files
Initialize utime with 0. It fixes a couple of compiler warnung:
warning: 'utime.mtime_ns' may be used uninitialized in this function [-Wmaybe-uninitialized]
1 parent 294b93d commit b3c8724

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Modules/posixmodule.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4751,6 +4751,7 @@ posix_utime(PyObject *self, PyObject *args, PyObject *kwargs)
47514751
PyObject *return_value = NULL;
47524752

47534753
memset(&path, 0, sizeof(path));
4754+
memset(&utime, 0, sizeof(utime_t));
47544755
#if UTIME_HAVE_FD
47554756
path.allow_fd = 1;
47564757
#endif

0 commit comments

Comments
 (0)
0