]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Cast a struct to a void pointer so as to do a type-safe pointer comparison
authorBrett Cannon <bcannon@gmail.com>
Thu, 7 Feb 2008 07:47:31 +0000 (07:47 +0000)
committerBrett Cannon <bcannon@gmail.com>
Thu, 7 Feb 2008 07:47:31 +0000 (07:47 +0000)
(mistmatch found by clang).

Python/compile.c

index 83a8fc07cee2f77837d10a8c514cc014947e4c66..8ae56159e1936645bc8be686f0798e4c2a5f5a89 100644 (file)
@@ -392,9 +392,9 @@ compiler_unit_check(struct compiler_unit *u)
 {
        basicblock *block;
        for (block = u->u_blocks; block != NULL; block = block->b_list) {
-               assert(block != (void *)0xcbcbcbcb);
-               assert(block != (void *)0xfbfbfbfb);
-               assert(block != (void *)0xdbdbdbdb);
+               assert((void *)block != (void *)0xcbcbcbcb);
+               assert((void *)block != (void *)0xfbfbfbfb);
+               assert((void *)block != (void *)0xdbdbdbdb);
                if (block->b_instr != NULL) {
                        assert(block->b_ialloc > 0);
                        assert(block->b_iused > 0);