From 985ddd05c10103ee37cf605d0fe98b5ecdd70d39 Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Mon, 18 Dec 2023 23:49:37 -0800 Subject: [PATCH] Fix clang "sometimes-uninitialized" and "unused-variable" warnings (#865) --- pkgs/jni/src/dartjni.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/jni/src/dartjni.c b/pkgs/jni/src/dartjni.c index 7c5951bc5..9e8ef3216 100644 --- a/pkgs/jni/src/dartjni.c +++ b/pkgs/jni/src/dartjni.c @@ -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); @@ -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) {