changeset 8573:3b5410755ebd

8177958: Possible uninitialized char* in vm_version_solaris_sparc.cpp Reviewed-by: kvn, shade
author shshahma
date Tue, 25 Jul 2017 10:38:28 -0400
parents d3cc20285653
children c7f6875cc8c3
files 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/src/os_cpu/solaris_sparc/vm/vm_version_solaris_sparc.cpp	Wed Jun 07 13:59:35 2017 -0400
+++ b/src/os_cpu/solaris_sparc/vm/vm_version_solaris_sparc.cpp	Tue Jul 25 10:38:28 2017 -0400
@@ -442,7 +442,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();
@@ -477,7 +477,7 @@
       kstat_close(kc);
     }
   }
-  assert(impl_m != 0, err_msg("Unknown CPU implementation %s", impl));
+  assert(impl_m != 0, err_msg("Unrecognized CPU implementation %s", impl));
   features |= impl_m;
 
   bool is_sun4v = (features & sun4v_m) != 0;