From: Tim Peters Date: Tue, 10 Sep 2002 15:37:28 +0000 (+0000) Subject: extract_time(): Squash compiler warning about possibly information- X-Git-Tag: v2.3c1~4157 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=96940cf30dcaac664e3af1dca79b502c78a41248;p=python extract_time(): Squash compiler warning about possibly information- losing implicit double->long cast. --- diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c index 465cb5181d..90c0aaca49 100644 --- a/Modules/posixmodule.c +++ b/Modules/posixmodule.c @@ -1412,7 +1412,7 @@ extract_time(PyObject *t, long* sec, long* usec) intval = PyInt_AsLong(intobj); Py_DECREF(intobj); *sec = intval; - *usec = (tval - intval) * 1e6; + *usec = (long)((tval - intval) * 1e6); /* can't exceed 1000000 */ if (*usec < 0) /* If rounding gave us a negative number, truncate. */