Skip to content

Commit 7c602cc

Browse files
vstinnerxzy3-cdc
authored andcommitted
bpo-38156: Fix compiler warning in PyOS_StdioReadline() (pythonGH-21721)
incr cannot be larger than INT_MAX: downcast to int explicitly.
1 parent 16479f7 commit 7c602cc

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Parser/myreadline.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@ PyOS_StdioReadline(FILE *sys_stdin, FILE *sys_stdout, const char *prompt)
317317
return NULL;
318318
}
319319
p = pr;
320-
int err = my_fgets(tstate, p + n, incr, sys_stdin);
320+
int err = my_fgets(tstate, p + n, (int)incr, sys_stdin);
321321
if (err == 1) {
322322
// Interrupt
323323
PyMem_RawFree(p);

0 commit comments

Comments
 (0)