转自:http://www.oschina.net/question/54100_33881

NSObject *obj = @"A string or other object.";
NSLog([NSString stringWithFormat:@"%@",obj]);// 有警告
NSLog([NSString stringWithFormat:@"%@",obj],nil);// 解决方案

Xcode 警告信息处理:Format string is not a string literal (potentially insecure)的更多相关文章

  1. 解决编译时出现的警告:format string is not a string literal (potentially insecure)

    NSLog([NSString stringWithFormat:@"%@/%@B.jpg", createDir, uuid]);//这是我的写法 应该写成 NSString * ...

  2. Hardcoded string "下一步", should use @string resource警告 (转载)

    转自:http://blog.csdn.net/iqv520/article/details/7579513 在布局文件中,文本的设置使用如下写法时会有警告:Hardcoded string &quo ...

  3. 定义私有属性: *String name; * int age; * String gender; * int salary; Date hiredate;//入职时间

    import java.text.SimpleDateFormat; import java.util.Date; /** * 定义私有属性: * String name; * int age; * ...

  4. String path = request.getContextPath(); String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";作用!!!!!

    <%String path = request.getContextPath();String basePath = request.getScheme()+"://"+re ...

  5. String使用机制及string.equals()和==的区别(转)

    http://904582819.blog.163.com/blog/static/11159282020127794456840/ equals方法和==的区别   首先大家知道,String既可以 ...

  6. .NET中string[]数组和List<string>泛型的相互转换以及Array类的Sort()方法(转)

    从string[]转List<string>: " }; List<string> list = new List<string>(str); 从List ...

  7. convert NameValueCollection/Dictionary<string, object> to JSON string

    public static class WebExtension { public static T Decode<T>(this RequestBase res) { Type type ...

  8. 深入解析字符串的比较方法:“==”操作符;String.Equals方法;String.Compare方法;String.CompareOrdinal方法。

    1:要判断2个字符串变量是否相等,最高效的方法是看它们是否指向相同的内存地址.前面使用RefernceEquals方法来比较.如果2个变量指向的是不同的内存地址,那么就需要逐字符的比较2个字符串的变量 ...

  9. Library string type(2)——关于String的操作

    关于string的定义,请参阅博文http://blog.csdn.net/larry233/article/details/51483827 string的操作 s.empty() //Return ...

随机推荐

  1. Dependent Parameters in Concurrent Program using Special Value Set

    Dependent Parameters in Oracle Applications Requirement: Say there is a concurrent program that lets ...

  2. .Net的差评

    .NET平台很棒.真的很棒.直到它不再那么棒.我为什么不再用.NET?简单来说,它限制了我们选择的能力(对我来说很重要),转移了我们的注意力,使得我们向内认知它的安全性,替代了帮助我们认知外面广阔世界 ...

  3. The file “Info.plist” couldn’t be opened because there is no such file

    修改了Info.plist的实际文件位置(项目和单元测试对应不同的Info.plist),报错 (null): could not read data from '/Users/xxxxx/Deskt ...

  4. 【LaTeX】E喵的LaTeX新手入门教程(2)基础排版

    换了块硬盘折腾了好久..联想的驱动真坑爹.前情回顾[LaTeX]E喵的LaTeX新手入门教程(1)准备篇文档框架嗯昨天我们已经编写了一个最基本的文档,其内容是这样的:\documentclass{ar ...

  5. The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path:

    今天下载Windows安装版的tomcat5.5,安装完以后启动时候出现: The Apache Tomcat Native library which allows optimal performa ...

  6. Python和Flask真强大:不能错过的15篇技术热文(转载)

    Python和Flask真强大:不能错过的15篇技术热文 本文精选了 Python开发者 11月份的15篇 Python 热文.其中有基础知识,机器学习,爬虫项目实战等. 注:以下文章,点击标题即可阅 ...

  7. MongoDB分片集群常用操作

    下架主节点: db.adminCommand({replSetStepDown : 1, force : true}) 删除节点: rs.remove("IP:PORT") 新增节 ...

  8. Redis Cluster集群的搭建

    redis集群搭建原理: redis是单线程,但是一般的作为缓存使用的话,redis足够了,因为它的读写速度太快了.   官方的一个简单测试: 测试完成了50个并发执行100000个请求. 设置和获取 ...

  9. ios 程序发布使用xcode工具Application Loader 正在通过ITUNES STORE进行鉴定错误

    ios 程序发布使用xcode工具Application Loader 正在通过ITUNES STORE进行鉴定错误 一:此错误会导致上传程序,一直停留在验证阶段,而没有一点上传进度:结果会苦等半天, ...

  10. HDOJ 3944 DP?

    尽量沿着边走距离最短.化减后 C(n+1,k)+ n - k, 预处理阶乘,Lucas定理组合数取模 DP? Time Limit: 10000/3000 MS (Java/Others)    Me ...