changeset 46418:ddfa5bcf1d7a

8177958: Possible uninitialized char* in vm_version_solaris_sparc.cpp Reviewed-by: shade, dholmes, kevinw
author shshahma
date Wed, 26 Apr 2017 21:28:22 -0700
parents 1593c061e6af
children 472de094cd15 227f72691ac1
files hotspot/src/os_cpu/solaris_sparc/vm/vm_version_solaris_sparc.cpp
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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;