changeset 50317:54d1d6c2ec76

Fix uninitialized variable build errors
author mikael
date Wed, 06 Jun 2018 10:17:54 -0700
parents 4e275131da74
children 706145007744
files src/hotspot/share/code/codeCache.hpp src/hotspot/share/gc/shared/genCollectedHeap.cpp
diffstat 2 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/hotspot/share/code/codeCache.hpp	Wed Jun 06 09:56:42 2018 -0700
+++ b/src/hotspot/share/code/codeCache.hpp	Wed Jun 06 10:17:54 2018 -0700
@@ -318,7 +318,7 @@
   GrowableArrayIterator<CodeHeap*> _end;
 
  public:
-  CodeBlobIterator(T* nm = NULL) {
+  CodeBlobIterator(T* nm = NULL) : _code_blob(NULL) {
     if (Filter::heaps() == NULL) {
       return;
     }
--- a/src/hotspot/share/gc/shared/genCollectedHeap.cpp	Wed Jun 06 09:56:42 2018 -0700
+++ b/src/hotspot/share/gc/shared/genCollectedHeap.cpp	Wed Jun 06 10:17:54 2018 -0700
@@ -1147,7 +1147,7 @@
 static ScratchBlock *removeSmallestScratch(ScratchBlock **prev_ptr) {
   bool first = true;
   size_t min_size = 0;   // "first" makes this conceptually infinite.
-  ScratchBlock **smallest_ptr, *smallest;
+  ScratchBlock **smallest_ptr = NULL, *smallest;
   ScratchBlock  *cur = *prev_ptr;
   while (cur) {
     assert(*prev_ptr == cur, "just checking");