8177958: Possible uninitialized char* in vm_version_solaris_sparc.cpp
authorshshahma
Wed, 26 Apr 2017 21:28:22 -0700
changeset 46418 ddfa5bcf1d7a
parent 46417 1593c061e6af
child 46419 472de094cd15
child 46420 227f72691ac1
8177958: Possible uninitialized char* in vm_version_solaris_sparc.cpp Reviewed-by: shade, dholmes, kevinw
hotspot/src/os_cpu/solaris_sparc/vm/vm_version_solaris_sparc.cpp
--- a/hotspot/src/os_cpu/solaris_sparc/vm/vm_version_solaris_sparc.cpp	Wed Apr 26 11:26:11 2017 -0700
+++ b/hotspot/src/os_cpu/solaris_sparc/vm/vm_version_solaris_sparc.cpp	Wed Apr 26 21:28:22 2017 -0700
@@ -404,7 +404,7 @@
   // is available to us as well
   Sysinfo cpu_info(SI_CPUBRAND);
   bool use_solaris_12_api = cpu_info.valid();
-  const char* impl;
+  const char* impl = "unknown";
   int impl_m = 0;
   if (use_solaris_12_api) {
     impl = cpu_info.value();
@@ -431,7 +431,7 @@
       kstat_close(kc);
     }
   }
-  assert(impl_m != 0, "Unknown CPU implementation %s", impl);
+  assert(impl_m != 0, "Unrecognized CPU implementation: %s", impl);
   features |= impl_m;
 
   bool is_sun4v = (features & sun4v_m) != 0;