I'm working on this tutorial application and the code is giving me this warning:
Xcode WARNING: Unused Entity Issue: Unused Variable
It's giving the error when executing this statement:
int newRowIndex = [self.checklist.items count];
What's causing it? Which steps should I take to resolve this?
The variable newRowIndex
is initialized but not being used anywhere else.
This warning just means that you created a variable, newRowIndex
, but are not using it anywhere.
To silence the warning, use this int
somewhere, like
int newRowIndex = [self.checklist.items count];
NSLog(@"New Row Index: %i", newRowIndex);
It's probably because your build settings might have warnings flagged as errors.
You can silence warnings (not advised but if you just want to make sure you can build something) by searching for "Warning Policies" and turning "Treat Warnings as Errors" to "No".
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With