aboutsummaryrefslogtreecommitdiff
path: root/Parser
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2020-08-04 02:38:16 +0200
committerGitHub <noreply@github.com>2020-08-04 02:38:16 +0200
commitbde48fd8110cc5f128d5db44810d17811e328a24 (patch)
tree6a5f3657cfe9dd89b5429df44ed8420660a229c4 /Parser
parentbpo-38912: regrtest logs unraisable exception into sys.__stderr__ (GH-21718) (diff)
downloadcpython-bde48fd8110cc5f128d5db44810d17811e328a24.tar.gz
cpython-bde48fd8110cc5f128d5db44810d17811e328a24.tar.bz2
cpython-bde48fd8110cc5f128d5db44810d17811e328a24.zip
bpo-38156: Fix compiler warning in PyOS_StdioReadline() (GH-21721)
incr cannot be larger than INT_MAX: downcast to int explicitly.
Diffstat (limited to 'Parser')
-rw-r--r--Parser/myreadline.c2
1 files changed, 1 insertions, 1 deletions
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);