天天看點

Format string is not a string literal (potentially insecure)

Warning:  Format string is not a string literal (potentially

insecure)

[objc] 

NSString * str = nil;  

str = [NSString stringWithFormat:@"---%d---", 18] ;  

NSLog(str);  

解決1:

NSLog(str,nil);  

解決2:

NSLog(@"%@", str);