Mercurial > hg > graal-jvmci-8
diff src/share/vm/prims/unsafe.cpp @ 23822:626f594dffa6
8139040: Fix initializations before ShouldNotReachHere() etc. and enable -Wuninitialized on linux.
Reviewed-by: stuefe, coleenp, roland
author | csahu |
---|---|
date | Tue, 01 Mar 2016 12:50:37 +0530 |
parents | f46871c6c063 |
children | d109bda16490 |
line wrap: on
line diff
--- a/src/share/vm/prims/unsafe.cpp Thu Feb 18 16:15:28 2016 +0100 +++ b/src/share/vm/prims/unsafe.cpp Tue Mar 01 12:50:37 2016 +0530 @@ -855,7 +855,7 @@ UNSAFE_ENTRY(jint, Unsafe_ArrayBaseOffset(JNIEnv *env, jobject unsafe, jclass acls)) UnsafeWrapper("Unsafe_ArrayBaseOffset"); - int base, scale; + int base = 0, scale = 0; getBaseAndScale(base, scale, acls, CHECK_0); return field_offset_from_byte_offset(base); UNSAFE_END @@ -863,7 +863,7 @@ UNSAFE_ENTRY(jint, Unsafe_ArrayIndexScale(JNIEnv *env, jobject unsafe, jclass acls)) UnsafeWrapper("Unsafe_ArrayIndexScale"); - int base, scale; + int base = 0, scale = 0; getBaseAndScale(base, scale, acls, CHECK_0); // This VM packs both fields and array elements down to the byte. // But watch out: If this changes, so that array references for