summaryrefslogtreecommitdiffstats
path: root/Parser
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2020-08-04 00:56:54 (GMT)
committerGitHub <noreply@github.com>2020-08-04 00:56:54 (GMT)
commitb6724be8047ac2404aab870d35d8f95bb0b7036a (patch)
treea2f6a71f824f62e3d768e80b400202ad1416ab39 /Parser
parent3c4fc864ce931db90214c54d742062a80dbef7c4 (diff)
downloadcpython-b6724be8047ac2404aab870d35d8f95bb0b7036a.zip
cpython-b6724be8047ac2404aab870d35d8f95bb0b7036a.tar.gz
cpython-b6724be8047ac2404aab870d35d8f95bb0b7036a.tar.bz2
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 bde48fd8110cc5f128d5db44810d17811e328a24) Co-authored-by: Victor Stinner <vstinner@python.org>
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 a49c9d8..143b41f 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);