解决NDK编译cpp文件出现的-Werror=format-security

来源:互联网 发布:淘宝网电脑版登录 怎么 编辑:程序博客网 时间:2024/04/25 04:54


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 followingshould be added to Android.mk as a work-around for the quoted error.

"LOCAL_DISABLE_FORMAT_STRING_CHECKS :=true"

 

然后就好了,感谢国外大神。

0 0
原创粉丝点击