2/08/2011

[Android-Building] error: format not a string literal and no format arguments

When you try to build android source code, you might encounter the following error message:


frameworks/base/core/jni/android_server_BluetoothHidService.cpp:66: error: format not a string literal and no format arguments


This might due to some security issue raised by apple to prevent over-flow attack, and the root cause is


LOGD(__FUNCTION__);


you might fix this issue by following modification:


LOGD("%s", __FUNCTION__);