PDA

View Full Version : Android NDK revision 9+ "-Werror=format-security"



FloatyBoaty
08-21-2014, 03:13 PM
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"


[armeabi] Compile++ arm : RTLooneyLadders <= AndroidUtils.cpp
jni/../../../shared/android/AndroidUtils.cpp: In function 'char* GetAndroidMainClassName()':
jni/../../../shared/android/AndroidUtils.cpp:142:32: error: format not a string literal and no format arguments [-Werror=format-security]
sprintf(name, package.c_str());