ios - Ignoring warning by #pragma -
how can disable xcode warning format string not string literal
in code below?
- (void)testremovingoldcode { nsmutabledictionary *oldrequestdict = [[[oldconfigmanager sharedmanager] feedurlforkey:kstatitemfixturedetailurlkey] mutablecopy]; nsstring *urlstring = [nsstring stringwithformat:oldrequestdict[kurlkey], //warning: "format string not string literal" @"param1", @"param2", @"param3"]; }
i tired (without success):
#pragma gcc diagnostic ignored "-wall" #pragma clang diagnostic ignored "-wall"
-wall
doesn't include warnings, includes specified set of warnings. might more successful -weverything
, however, it's best find exact warning want block. in case -wformat-nonliteral
.