开发者

warning message "format not a string literal and no format arguments"

开发者 https://www.devze.com 2023-03-23 11:19 出处:网络
I am seeing this warning message \"format not a string literal and no format arguments\" but it is not showing in which line message is occurring. It is showing when I am debugging and running my appl

I am seeing this warning message "format not a string literal and no format arguments" but it is not showing in which line message is occurring. It is showing when I am debugging and running my application. My file name is addaccount.m and it has some header file connected.

why this not show开发者_JAVA技巧ing line number?

Thanks in advance


It sounds like you have a bad NSLog function call. Search for NSLog in your project and check if that's the thing.


If your pch file (common header) define a macro for nslog as below. You will get the line number.

#   define CustomLog(fmt, ...) NSLog((@"%s [Line %d] " fmt), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__);

And replace NSLog with CustomLog

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号