mirror of
https://github.com/python/cpython.git
synced 2025-08-31 22:18:28 +00:00
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 bde48fd811
)
Co-authored-by: Victor Stinner <vstinner@python.org>
This commit is contained in:
parent
3c4fc864ce
commit
b6724be804
1 changed files with 1 additions and 1 deletions
|
@ -317,7 +317,7 @@ PyOS_StdioReadline(FILE *sys_stdin, FILE *sys_stdout, const char *prompt)
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
p = pr;
|
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) {
|
if (err == 1) {
|
||||||
// Interrupt
|
// Interrupt
|
||||||
PyMem_RawFree(p);
|
PyMem_RawFree(p);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue