Would you be able to help to delete the warning discussed below ?
I have one file example.h
In that I declared static const NSString *variable = @"cool";
Now, I have another file multiple.m. In this file I have a function Bool var2 = [object methodname:variable];
It means, I passed variable as parameter for this function, but I got warning like this:
variable is defined but not used
So,how to remove this warning?
please help me
if example.h is imported in other files aside from multiple.m, then the compiler does the check in every file it is imported into, and reports when the variable is unused in that file.
if you want to get rid of the warnings, i would change that from a static const to a macro like so:
GCC won’t report on unused macros.