当前位置:首页 > Format string is not a string literal(potentially insecure) 警告的解决方法

Format string is not a string literal(potentially insecure) 警告的解决方法

点击次数:4093  更新日期:2013-08-30

NetWork *nw=[NetWork init];

NSLog([nw Query:@"a.aspx?a=validatenumber&number=111"]);

xcode4.2开发时,输入调试信息,如果调用一个方法返回的字符串,会报"Format string is not a string literal(potentially insecure) "这样的一个警告。

要解决这个问题,就得这样写

NSLog([nw Query:@"a.aspx?a=validatenumber&number=aaa"],nil);