how to suppress some warnings
I am currently implementing an iOS app with cocos2D, and as part of that some of my classes implement a selector with a required parameter, as follows:
-(void) sequenceStateSelectSkillByPlayer:(ccTime) dt{
if (cycleCount_==1) {
if (isInPosition_) {
// we are already in place !
touchHandler_.isEnabled=YES;
isSequencingSkillsChoice_=YES;
[self interruptScheduling];
}else {
nextState_=mpFightSkillsStateSelectSkillByPlayer;
flightType_=mpFightSkillsFlightTypeIn;
[self resumeSequencingWithState:mpFightSkillsStateFly];
}
}
}
the method signature must include the ct parameter, and i have many warnings regarding 'parameter not used'. Is there a way somewhere (that i missed) to turn off that warning ?
请先登录再写评论。
You can go to Preferences | Inspections and turn off this particular warning.
Does your method implement/override another method? In this case there shouldn't be a warning, otherwise it's a bug, please put it to the tracker.
All right Alexander, either i'm blind or i cant read properly, but I dont see any 'unused 'foo' parameter' anywhere ...
Preferences | Inspecgions | Unused code | Unused local variable
Yes, that does eliminate this warning. Unfortunately I now lose the useful 'unused local variable' warning.
Why do you think that it is false positive? Are there any hidden usages of the parameter, does the function have some inheritor or super functions? In these cases AppCode shouldn't show a warning.