https://github.com/python/cpython/commit/bde48fd8110cc5f128d5db44810d17811e328a24
commit: bde48fd8110cc5f128d5db44810d17811e328a24
branch: master
author: Victor Stinner <vstinner@python.org>
committer: GitHub <noreply@github.com>
date: 2020-08-04T02:38:16+02:00
summary:
bpo-38156: Fix compiler warning in PyOS_StdioReadline() (GH-21721)
incr cannot be larger than INT_MAX: downcast to int explicitly.
files:
M Parser/myreadline.c
diff --git a/Parser/myreadline.c b/Parser/myreadline.c
index a49c9d892dda9..143b41f1eab95 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);
_______________________________________________
Python-checkins mailing list
Python-checkins@python.org
https://mail.python.org/mailman/listinfo/python-checkins
commit: bde48fd8110cc5f128d5db44810d17811e328a24
branch: master
author: Victor Stinner <vstinner@python.org>
committer: GitHub <noreply@github.com>
date: 2020-08-04T02:38:16+02:00
summary:
bpo-38156: Fix compiler warning in PyOS_StdioReadline() (GH-21721)
incr cannot be larger than INT_MAX: downcast to int explicitly.
files:
M Parser/myreadline.c
diff --git a/Parser/myreadline.c b/Parser/myreadline.c
index a49c9d892dda9..143b41f1eab95 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);
_______________________________________________
Python-checkins mailing list
Python-checkins@python.org
https://mail.python.org/mailman/listinfo/python-checkins