In response to a comment made on this question: Is it possible to suppress Xcode 4 static analyzer warnings?, here is a false positive (or at least I believe so).
The code below gives the following message:
Although the value stored to 'action' is used in the enclosing expression, the value is never actually read from 'action'
NSArray *actions = [button actionsForTarget:target forControlEvent:controlEvent];
if (actions)
{
NSEnumerator *actionEnumerator = [actions objectEnumerator];
NSString *action;
while ((action = (NSString *)[actionEnumerator nextObject]))
{
[button removeTarget:target action:@selector(action) forControlEvents:controlEvent];
}
}