原文出处
最近编译的时候出现了打印日志时:
char * s = "cainiaobuhuifei";
LOGI(s);
报:error: format not a string literal and no format arguments [-Werror=format-security]
从上面那个网站找到了解决方法为:
as of Android NDK revision 9, the following should be added to Android.mk as a work-around for the quoted error.
"LOCAL_DISABLE_FORMAT_STRING_CHECKS := true"
"LOCAL_DISABLE_FORMAT_STRING_CHECKS := true"
然后就好了,感谢国外大神。