[LLVMbugs] [Bug 6865] New: Stop give vodka to static analyzer :)

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sun Apr 18 04:04:14 PDT 2010


http://llvm.org/bugs/show_bug.cgi?id=6865

           Summary: Stop give vodka to static analyzer :)
           Product: clang
           Version: unspecified
          Platform: Macintosh
        OS/Version: MacOS X
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Static Analyzer
        AssignedTo: kremenek at apple.com
        ReportedBy: aytharn at gmail.com
                CC: llvmbugs at cs.uiuc.edu


Definitively a totally nonsense error, or I am wrong?
See the attachment to see in the class Block.m what clang tell me as error!!!!
(both with SDK 3.2 and 4.0beta)

1) First of all, the value is incremented in each line (and to increment
something you need either to read the prev value or to use black magic, my
guess is clang does the first way...)

2) Second after this block is created I MUST use this value FOREACH block with
no exceptions to add it in the 2D engine Cocos2d... Look at the [self
addChild...] I use to pass this value generated before, how this crazy clang
could think that the value is never read???

for (int i = 0; i < [playerOne.currentBlock.bricks count]; i++) {
        Brick *brick = [playerOne.currentBlock.bricks objectAtIndex:i];
        brick.bColumn += 4;
        brick.bRow += 18;
        brick.position = ccp(pad + brick.bColumn * (side + 3), pad + brick.bRow
* side); 
        [blockOne.bricks addObject:brick];
        [self addChild:[playerOne.currentBlock.bricks objectAtIndex:i] z:1
tag:brick.myTag];
    }


Thank you!

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list