From bde48fd8110cc5f128d5db44810d17811e328a24 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Tue, 4 Aug 2020 02:38:16 +0200 Subject: [PATCH] bpo-38156: Fix compiler warning in PyOS_StdioReadline() (GH-21721) incr cannot be larger than INT_MAX: downcast to int explicitly. --- Parser/myreadline.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Parser/myreadline.c b/Parser/myreadline.c index a49c9d892dd..143b41f1eab 100644 --- a/Parser/myreadline.c +++ b/Parser/myreadline.c @@ -317,7 +317,7 @@ PyOS_StdioReadline(FILE *sys_stdin, FILE *sys_stdout, const char *prompt) return NULL; } p = pr; - int err = my_fgets(tstate, p + n, incr, sys_stdin); + int err = my_fgets(tstate, p + n, (int)incr, sys_stdin); if (err == 1) { // Interrupt PyMem_RawFree(p);