Skip to content

Commit a6c2712

Browse files
vstinnermiss-islington
authored andcommitted
bpo-38156: Fix compiler warning in PyOS_StdioReadline() (pythonGH-21721)
incr cannot be larger than INT_MAX: downcast to int explicitly. (cherry picked from commit bde48fd) Co-authored-by: Victor Stinner <[email protected]>
1 parent 4bc8445 commit a6c2712

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
@@ -318,7 +318,7 @@ PyOS_StdioReadline(FILE *sys_stdin, FILE *sys_stdout, const char *prompt)
318318
return NULL;
319319
}
320320
p = pr;
321-
int err = my_fgets(tstate, p + n, incr, sys_stdin);
321+
int err = my_fgets(tstate, p + n, (int)incr, sys_stdin);
322322
if (err == 1) {
323323
// Interrupt
324324
PyMem_RawFree(p);

0 commit comments

Comments
 (0)