-1

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:(NSTimeInterval)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?

Tuyen Nguyen
  • 4,389
  • 7
  • 51
  • 77

1 Answers1

0

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;?

PengOne
  • 48,188
  • 17
  • 130
  • 149