Skip to content

Commit bde48fd

Browse files
authored
bpo-38156: Fix compiler warning in PyOS_StdioReadline() (GH-21721)
incr cannot be larger than INT_MAX: downcast to int explicitly.
1 parent 701b638 commit bde48fd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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)