Skip to content

Commit b6724be

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 3c4fc86 commit b6724be

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)