Merge "Fix misc-macro-parentheses warnings in services jni."

This commit is contained in:
Treehugger Robot
2016-05-19 23:24:03 +00:00
committed by Gerrit Code Review
8 changed files with 17 additions and 17 deletions

View File

@@ -196,11 +196,11 @@ static jboolean com_android_server_AssetAtlasService_upload(JNIEnv* env, jobject
#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 " className);
#define GET_METHOD_ID(var, clazz, methodName, methodDescriptor) \
var = env->GetMethodID(clazz, methodName, methodDescriptor); \
LOG_FATAL_IF(!var, "Unable to find method " methodName);
LOG_FATAL_IF(!(var), "Unable to find method " methodName);
const char* const kClassPathName = "com/android/server/AssetAtlasService";

View File

@@ -51,8 +51,8 @@ static inline in_addr_t *as_in_addr(sockaddr *sa) {
//------------------------------------------------------------------------------
#define SYSTEM_ERROR -1
#define BAD_ARGUMENT -2
#define SYSTEM_ERROR (-1)
#define BAD_ARGUMENT (-2)
static int create_interface(int mtu)
{

View File

@@ -284,7 +284,7 @@ void HdmiCecController::onReceived(const hdmi_event_t* event, void* arg) {
//------------------------------------------------------------------------------
#define GET_METHOD_ID(var, clazz, methodName, methodDescriptor) \
var = env->GetMethodID(clazz, methodName, methodDescriptor); \
LOG_FATAL_IF(! var, "Unable to find method " methodName);
LOG_FATAL_IF(! (var), "Unable to find method " methodName);
static jlong nativeInit(JNIEnv* env, jclass clazz, jobject callbacksObj,
jobject messageQueueObj) {

View File

@@ -128,11 +128,11 @@ static const JNINativeMethod gInputApplicationHandleMethods[] = {
#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 " 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 " fieldName);
int register_android_server_InputApplicationHandle(JNIEnv* env) {
int res = jniRegisterNativeMethods(env, "com/android/server/input/InputApplicationHandle",

View File

@@ -1429,15 +1429,15 @@ static const JNINativeMethod gInputManagerMethods[] = {
#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 " className);
#define GET_METHOD_ID(var, clazz, methodName, methodDescriptor) \
var = env->GetMethodID(clazz, methodName, methodDescriptor); \
LOG_FATAL_IF(! var, "Unable to find method " methodName);
LOG_FATAL_IF(! (var), "Unable to find method " methodName);
#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 " fieldName);
int register_android_server_InputManager(JNIEnv* env) {
int res = jniRegisterNativeMethods(env, "com/android/server/input/InputManagerService",

View File

@@ -218,11 +218,11 @@ static const JNINativeMethod gInputWindowHandleMethods[] = {
#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 " 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 " fieldName);
int register_android_server_InputWindowHandle(JNIEnv* env) {
int res = jniRegisterNativeMethods(env, "com/android/server/input/InputWindowHandle",

View File

@@ -186,15 +186,15 @@ static const JNINativeMethod gPowerManagerServiceMethods[] = {
#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 " className);
#define GET_METHOD_ID(var, clazz, methodName, methodDescriptor) \
var = env->GetMethodID(clazz, methodName, methodDescriptor); \
LOG_FATAL_IF(! var, "Unable to find method " methodName);
LOG_FATAL_IF(! (var), "Unable to find method " methodName);
#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 " fieldName);
int register_android_server_PowerManagerService(JNIEnv* env) {
int res = jniRegisterNativeMethods(env, "com/android/server/power/PowerManagerService",

View File

@@ -678,11 +678,11 @@ static const JNINativeMethod gTvInputHalMethods[] = {
#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 " className)
#define GET_METHOD_ID(var, clazz, methodName, fieldDescriptor) \
var = env->GetMethodID(clazz, methodName, fieldDescriptor); \
LOG_FATAL_IF(! var, "Unable to find method" methodName)
LOG_FATAL_IF(! (var), "Unable to find method" methodName)
int register_android_server_tv_TvInputHal(JNIEnv* env) {
int res = jniRegisterNativeMethods(env, "com/android/server/tv/TvInputHal",