[Python-checkins] Fix compiler warning in new code. (#14690)

Tim Peters webhook-mailer at python.org
Wed Jul 10 17:24:05 EDT 2019


https://github.com/python/cpython/commit/b64c2c66e5cfe6d138b342ee58ee3b13a8d7ef16
commit: b64c2c66e5cfe6d138b342ee58ee3b13a8d7ef16
branch: master
author: Tim Peters <tim.peters at gmail.com>
committer: GitHub <noreply at github.com>
date: 2019-07-10T16:24:01-05:00
summary:

Fix compiler warning in new code. (#14690)

uintptr_t is an integer type, and can't be compared to NULL directly.

files:
M Objects/obmalloc.c

diff --git a/Objects/obmalloc.c b/Objects/obmalloc.c
index bb154c76ab18..2c00efc255dc 100644
--- a/Objects/obmalloc.c
+++ b/Objects/obmalloc.c
@@ -1215,7 +1215,7 @@ _Py_GetAllocatedBlocks(void)
     /* add up allocated blocks for used pools */
     for (uint i = 0; i < maxarenas; ++i) {
         /* Skip arenas which are not allocated. */
-        if (arenas[i].address == NULL) {
+        if (arenas[i].address == 0) {
             continue;
         }
 



More information about the Python-checkins mailing list