Skip to content

Commit 9bf970c

Browse files
committed
unix/modtime: Add type casting.
This adds type casting to avoid build errors. Signed-off-by: Yanfeng Liu <[email protected]>
1 parent 27b7bf3 commit 9bf970c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ports/unix/modtime.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ static mp_obj_t mod_time_mktime(mp_obj_t tuple) {
189189
time.tm_isdst = -1; // auto-detect
190190
}
191191
time_t ret = mktime(&time);
192-
if (ret == -1) {
192+
if (ret == (time_t)-1) {
193193
mp_raise_msg(&mp_type_OverflowError, MP_ERROR_TEXT("invalid mktime usage"));
194194
}
195195
return timeutils_obj_from_timestamp(ret);

0 commit comments

Comments
 (0)