mirror of
https://github.com/python/cpython.git
synced 2025-08-22 09:45:06 +00:00
Issue #22156: Fix "comparison between signed and unsigned integers" compiler
warnings in the Python/ subdirectory.
This commit is contained in:
parent
eae94706a3
commit
98ea54c35c
5 changed files with 6 additions and 6 deletions
|
@ -1738,7 +1738,7 @@ print_error_text(PyObject *f, int offset, PyObject *text_obj)
|
|||
return;
|
||||
|
||||
if (offset >= 0) {
|
||||
if (offset > 0 && offset == strlen(text) && text[offset - 1] == '\n')
|
||||
if (offset > 0 && (size_t)offset == strlen(text) && text[offset - 1] == '\n')
|
||||
offset--;
|
||||
for (;;) {
|
||||
nl = strchr(text, '\n');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue