Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 329e492

Browse files
committed
Issue #20656: Restore explicit downcast in select_select().
Cast from time_t (64 bit) to long (32 bit). It should fix a compiler warning.
1 parent 0aba4dc commit 329e492

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

Modules/selectmodule.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,10 +232,11 @@ select_select(PyObject *self, PyObject *args)
232232
return NULL;
233233
}
234234
#endif
235+
tv.tv_sec = (long)sec;
235236
#else
236237
assert(sizeof(tv.tv_sec) >= sizeof(sec));
237-
#endif
238238
tv.tv_sec = sec;
239+
#endif
239240
tv.tv_usec = usec;
240241
if (tv.tv_sec < 0) {
241242
PyErr_SetString(PyExc_ValueError, "timeout must be non-negative");

0 commit comments

Comments
 (0)