Skip to content

Commit

Permalink
Fix clang "sometimes-uninitialized" and "unused-variable" warnings (#865
Browse files Browse the repository at this point in the history
)
  • Loading branch information
brianquinlan committed Dec 19, 2023
1 parent 8107f37 commit 985ddd0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkgs/jni/src/dartjni.c
Original file line number Diff line number Diff line change
Expand Up @@ -453,6 +453,7 @@ JniResult newPrimitiveArray(jsize length, int type) {
// This error should have been handled in dart.
// is there a way to mark this as unreachable?
// or throw exception in Dart using Dart's C API.
array = NULL;
break;
}
return to_global_ref_result(array);
Expand All @@ -468,7 +469,6 @@ JniResult newObjectArray(jsize length,
}

JniResult getArrayElement(jarray array, int index, int type) {
JniResult result = {{.l = NULL}, NULL};
attach_thread();
jvalue value;
switch (type) {
Expand Down

0 comments on commit 985ddd0

Please sign in to comment.