summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2013-10-23 19:46:31 +0200
committerJulian Andres Klode <jak@debian.org>2013-10-23 19:46:31 +0200
commit3328ee63967cbcb858f9ba081efe5de0459ed27a (patch)
tree3c0ae734a125e9eded496e2041ed1349db4cbcf3 /python
parent64639a3e1df8ed220250c4c1e56aa93d76c652a6 (diff)
downloadpython-apt-3328ee63967cbcb858f9ba081efe5de0459ed27a.tar.gz
python/arfile.cc: (C++11) Explicitly cast unsigned long to time_t in {}
According to gcc, the expression would be ill-formed in C++11 otherwise.
Diffstat (limited to 'python')
-rw-r--r--python/arfile.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/python/arfile.cc b/python/arfile.cc
index 50cd1246..8f45e658 100644
--- a/python/arfile.cc
+++ b/python/arfile.cc
@@ -232,7 +232,8 @@ static PyObject *_extract(FileFd &Fd, const ARArchive::Member *member,
return PyErr_SetFromErrnoWithFilename(PyExc_OSError, outfile);
size -= read;
}
- utimbuf time = {member->MTime, member->MTime};
+ utimbuf time = {static_cast<time_t>(member->MTime),
+ static_cast<time_t>(member->MTime)};
if (utime(outfile,&time) == -1)
return PyErr_SetFromErrnoWithFilename(PyExc_OSError, outfile);
Py_RETURN_TRUE;