iPhone - Three220 - TTScrollView : Dead store analyzed result
I've just moved my project to XCode 4 from Xcode 3 and see this Dead Store in TTScrollView class:
- (CGFloat)tween:(NSTimeInterval)t b:(NSTimeInterval)b c:(NSTi开发者_如何学JAVAmeInterval)c d:(NSTimeInterval)d
{
return c*((t=t/d-1)*t*t + 1) + b;
}
The warning is:
"Although the value stored to 't' is used in the enclosing expression, the value is never actually read from 't'"
How do I fix this?
Look closely at
c*((t=t/d-1)*t*t + 1) + b;
You are redefining t
! I don't think this is what you mean to be doing here. Perhaps ==
? Or perhaps you just mean c*((t/d-1)*t*t + 1) + b;
?
精彩评论