diff --git a/src/app/server/java/BUILD.gn b/src/app/server/java/BUILD.gn index 905257607e7178..fa3a49f8be2737 100644 --- a/src/app/server/java/BUILD.gn +++ b/src/app/server/java/BUILD.gn @@ -43,6 +43,8 @@ static_library("jni") { ] public_configs = [ "${chip_root}/src:includes" ] + + cflags = [ "-Wconversion" ] } android_library("java") { diff --git a/src/app/server/java/ChipFabricProvider-JNI.cpp b/src/app/server/java/ChipFabricProvider-JNI.cpp index ae7aac3ce75af0..8fea4d4c9ba47b 100644 --- a/src/app/server/java/ChipFabricProvider-JNI.cpp +++ b/src/app/server/java/ChipFabricProvider-JNI.cpp @@ -99,7 +99,7 @@ CHIP_ERROR ReadFabricList(JNIEnv * env, jobject & self) VerifyOrExit(jlabel != nullptr, err = CHIP_JNI_ERROR_FIELD_NOT_FOUND); env->SetIntField(jFabric, jvendorId, fabricInfo.GetVendorId()); - env->SetLongField(jFabric, jnodeId, fabricInfo.GetNodeId()); + env->SetLongField(jFabric, jnodeId, static_cast(fabricInfo.GetNodeId())); env->SetShortField(jFabric, jfabricIndex, fabricInfo.GetFabricIndex()); UtfString jLabelStr(env, fabricInfo.GetFabricLabel()); env->SetObjectField(jFabric, jlabel, jLabelStr.jniValue());