Skip to content

Commit 46e448a

Browse files
bpo-38156: Fix compiler warning in PyOS_StdioReadline() (GH-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 b934d83 commit 46e448a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Parser/myreadline.c

+1-1
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)