diff options
author | Victor Stinner <vstinner@python.org> | 2020-08-04 02:38:16 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-04 02:38:16 +0200 |
commit | bde48fd8110cc5f128d5db44810d17811e328a24 (patch) | |
tree | 6a5f3657cfe9dd89b5429df44ed8420660a229c4 /Parser | |
parent | bpo-38912: regrtest logs unraisable exception into sys.__stderr__ (GH-21718) (diff) | |
download | cpython-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.c | 2 |
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); |