Skip to content

Commit

Permalink
Enable -Wconversion in the java server. (#25405)
Browse files Browse the repository at this point in the history
Note #25403
tracking whether this is in fact the right fix.
  • Loading branch information
bzbarsky-apple authored and pull[bot] committed Jul 25, 2023
1 parent 4c226fd commit 1081651
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/app/server/java/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ static_library("jni") {
]

public_configs = [ "${chip_root}/src:includes" ]

cflags = [ "-Wconversion" ]
}

android_library("java") {
Expand Down
2 changes: 1 addition & 1 deletion src/app/server/java/ChipFabricProvider-JNI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<jlong>(fabricInfo.GetNodeId()));
env->SetShortField(jFabric, jfabricIndex, fabricInfo.GetFabricIndex());
UtfString jLabelStr(env, fabricInfo.GetFabricLabel());
env->SetObjectField(jFabric, jlabel, jLabelStr.jniValue());
Expand Down

0 comments on commit 1081651

Please sign in to comment.