Fix errors in LOG_FATAL_IF arguments.

They were found only when compiled with clang-tidy.

Bug: 111850071
Test: build with WITH_TIDY=1
Change-Id: I696b9095dc44e9ed7a8a7a90346804a01de39072
This commit is contained in:
Chih-Hung Hsieh
2018-07-26 15:40:45 -07:00
parent 2b4e35c3e2
commit acb1de8443

View File

@@ -43,27 +43,27 @@ namespace android {
#define FIND_CLASS(var, className) \
var = env->FindClass(className); \
LOG_FATAL_IF(! (var), "Unable to find class " className);
LOG_FATAL_IF(! (var), "Unable to find class %s", className);
#define GET_FIELD_ID(var, clazz, fieldName, fieldDescriptor) \
var = env->GetFieldID(clazz, fieldName, fieldDescriptor); \
LOG_FATAL_IF(! (var), "Unable to find field " fieldName);
LOG_FATAL_IF(! (var), "Unable to find field %s", fieldName);
#define GET_METHOD_ID(var, clazz, fieldName, fieldDescriptor) \
var = env->GetMethodID(clazz, fieldName, fieldDescriptor); \
LOG_FATAL_IF(! (var), "Unable to find method " fieldName);
LOG_FATAL_IF(! (var), "Unable to find method %s", fieldName);
#define GET_STATIC_FIELD_ID(var, clazz, fieldName, fieldDescriptor) \
var = env->GetStaticFieldID(clazz, fieldName, fieldDescriptor); \
LOG_FATAL_IF(! (var), "Unable to find field " fieldName);
LOG_FATAL_IF(! (var), "Unable to find field %s", fieldName);
#define GET_STATIC_METHOD_ID(var, clazz, fieldName, fieldDescriptor) \
var = env->GetStaticMethodID(clazz, fieldName, fieldDescriptor); \
LOG_FATAL_IF(! (var), "Unable to find static method " fieldName);
LOG_FATAL_IF(! (var), "Unable to find static method %s", fieldName);
#define GET_STATIC_OBJECT_FIELD(var, clazz, fieldName) \
var = env->GetStaticObjectField(clazz, fieldName); \
LOG_FATAL_IF(! (var), "Unable to find static object field " fieldName);
#define GET_STATIC_OBJECT_FIELD(var, clazz, fieldId) \
var = env->GetStaticObjectField(clazz, fieldId); \
LOG_FATAL_IF(! (var), "Unable to find static object field %p", fieldId);
struct RequestFields {