Issue 22218: Fix more compiler warnings "comparison between signed and unsigned integers" (original) (raw)

Created on 2014-08-17 17:31 by vstinner, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
fix_more_warnings.patch vstinner,2014-08-17 17:31 review
fix_warning_unicodeobject.diff matrixise,2014-10-11 09:43 review
issue22218-2.patch matrixise,2015-11-22 10:38 review
Messages (9)
msg225453 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2014-08-17 17:31
The issue #22110 enabled more compiler warnings. Attached patch fixes some of them in the Modules/ subdirectory.
msg225454 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2014-08-17 17:34
New changeset 05e8f92b58ff by Victor Stinner in branch 'default': Issue #22218: Fix "comparison between signed and unsigned integers" warnings in http://hg.python.org/cpython/rev/05e8f92b58ff
msg225455 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2014-08-17 17:38
You are very fast.
msg225460 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2014-08-17 19:07
New changeset ca5eef14c1ab by Victor Stinner in branch 'default': Issue #22218: Fix "comparison between signed and unsigned integers" warnings in http://hg.python.org/cpython/rev/ca5eef14c1ab
msg225461 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2014-08-17 19:10
New changeset 2f2c1816d0c7 by Victor Stinner in branch 'default': Issue #22218: Fix "comparison between signed and unsigned integers" warning in http://hg.python.org/cpython/rev/2f2c1816d0c7
msg225463 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2014-08-17 19:23
> You are very fast. Oh sorry. In fact, I didn't expect a review. I just created an issue to put an issue number in the commit changelog and give a little bit more context to my changes.
msg229071 - (view) Author: Stéphane Wirtel (matrixise) * (Python committer) Date: 2014-10-11 09:43
Hi Victor, Here is a small patch for the unicodeobject.c file. I am not sure if it's the correct solution to this problem, but for me, the size parameter should be a unsigned long and not a signed.
msg255092 - (view) Author: Stéphane Wirtel (matrixise) * (Python committer) Date: 2015-11-22 10:38
a patch for 3.6 for the unicodeobject.c file
msg262468 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2016-03-25 23:42
fix_warning_unicodeobject.diff and -2.patch don't seem to be needed anymore. The code is now: if (PY_SSIZE_T_MAX / (Py_ssize_t)sizeof(wchar_t) < (size + 1)) return NULL; I close the issue. More specific issues must be opened if you still want to fix similar issues.
History
Date User Action Args
2022-04-11 14:58:07 admin set github: 66414
2016-03-25 23:42:06 vstinner set status: open -> closedresolution: fixedmessages: +
2015-11-22 10:38:12 matrixise set files: + issue22218-2.patchmessages: + versions: + Python 3.6, - Python 3.5
2014-10-11 09:43:46 matrixise set files: + fix_warning_unicodeobject.diffnosy: + matrixisemessages: +
2014-08-17 19:23:21 vstinner set messages: +
2014-08-17 19:10:06 python-dev set messages: +
2014-08-17 19:07:28 python-dev set messages: +
2014-08-17 17:38:24 serhiy.storchaka set messages: +
2014-08-17 17:34:43 python-dev set nosy: + python-devmessages: +
2014-08-17 17:31:28 vstinner set nosy: + neologix, serhiy.storchaka
2014-08-17 17:31:19 vstinner create