From 974403a2c5465bd68be379f41213cc1aa56b983e Mon Sep 17 00:00:00 2001 From: George Burgess IV Date: Tue, 24 Jan 2017 15:59:19 -0800 Subject: [PATCH] Fix a use-of-uninitialized-value warning This is the result of running ./gen after applying I90bea0c94cf8d7f92a0d9a4db4e64e7e563bfb09. Bug: None Test: Still builds; warning is now gone. Change-Id: Ibcd5e8dcec96406b529c5790ba0a2822dace25c2 --- core/jni/com_google_android_gles_jni_GLImpl.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/core/jni/com_google_android_gles_jni_GLImpl.cpp b/core/jni/com_google_android_gles_jni_GLImpl.cpp index ad7d744cb693e..3e74d1c855b36 100644 --- a/core/jni/com_google_android_gles_jni_GLImpl.cpp +++ b/core/jni/com_google_android_gles_jni_GLImpl.cpp @@ -132,6 +132,7 @@ getPointer(JNIEnv *_env, jobject buffer, jarray *array, jint *remaining, jint *o pointer = _env->CallStaticLongMethod(nioAccessClass, getBasePointerID, buffer); if (pointer != 0L) { + *offset = 0; *array = NULL; return reinterpret_cast(pointer); } @@ -139,6 +140,7 @@ getPointer(JNIEnv *_env, jobject buffer, jarray *array, jint *remaining, jint *o *array = (jarray) _env->CallStaticObjectMethod(nioAccessClass, getBaseArrayID, buffer); if (*array == NULL) { + *offset = 0; return (void*) NULL; } *offset = _env->CallStaticIntMethod(nioAccessClass,