I want to get rid of this compiler warning in only one file of my Xcode project. Is there any way to do this?
You can disable special warnings in Clang using the pragmatic directive and the keyword "diagnostics" :
#pragma clang diagnostic push #pragma clang diagnostic ignored "-Wunused-variable" // Insert code here #pragma clang diagnostic pop
No unused warning variables will be generated for the code between the click and the pop file.
The second option, even more targeted, is to mark a specific variable with an attribute
__attribute__((unused)) NSString * thisStringIsJustForFun = @"It only work if somebody makes you do it.";
Source: https://habr.com/ru/post/1498770/More articles:In the application Billing V3 - androidWhile loop substitution is vs. here is the line with the replacement command - bashMockito Verify: checked during check () than during invocation of bullying method - javaEasy way to populate Excel file with Python - pythonLogout - phpBitmap.compress png 8-bit palette - androidPrinting a stack to the console while replenishing elements eliminates an exception - javaWhy can't I override the * method in Ruby? - ruby | fooobar.comAndroid - BroadcastReceiver doesn't get user intentions - androidLambda expression in WHERE statement not working properly - neo4jclientAll Articles