转载自:http://www.cocoachina.com/bbs/read.PHP?tid-115146.html
我这里需要判断手机号码,qq号码,邮箱等的规范,所以需要用到正则表达式,导入RegexKitLite.h之后就出现了警告
1
2
3
|
id
functionString = [exception objectForKey:@
"function"
],fileString = [exception objectForKey:@
"file"
"description"
"line"
];
RKLCHardAbortAssert((functionString !=
NULL
) && (fileString !=
) && (descriptionString !=
) && (lineNumber !=
));
[[
NSAssertionHandler
currentHandler] handleFailureInFunction:functionString file:fileString lineNumber:(
NSInteger
)[lineNumber longValue] description:descriptionString];
|
这就是出现警告的地方, Format string is not a string literal (potentially insecure)
这里该怎么修改才可以去掉警告呢
description:descriptionString,nil];
还有个地方说这样改:
;
[[NSAssertionHandler currentHandler] handleFailureInFunction:functionString file:fileString lineNumber:(NSInteger)[lineNumber longValue] description:descriptionString];
A : [[ NSAssertionHandler currentHandler ] handleFailureInFunction :functionString file :fileString lineNumber :( NSInteger )[lineNumber longValue description : @"%@" ,descriptionString];
转载自:http://blog.csdn.net/shijiucdy/article/details/8755667