I'm using Xcode 4.6 and I've got a header file which includes some constants I use throughout my code. I don't want to use preprocessor directives because I want them to be properly typed and such.
For example, I have this code in one of my .h files:
static NSString *kErrorCannotDivideByZero = @"Error: Cannot divide by zero";
and I use it in the corresponding .m file:
[self showToast:kErrorCannotDivideByZero];
I get the warning:
/path/to/my/headerFile.h:32:18: Unused variable 'kErrorCannotDivideByZero'
I know it's just a warning, but I've got about 50 of these warnings clogging up my compiler output.
Why am I getting this warning and how do I PROPERLY resolve it?
I'm not interested in simply suppressing all unused variable warnings, because I do want to get the legit ones.