test/hotspot/gtest/metaspace/test_commitmask.cpp
branchstuefe-new-metaspace-branch
changeset 58099 5aeb07390c74
parent 58063 bdf136b8ae0e
child 58683 2d5dd194c65c
--- a/test/hotspot/gtest/metaspace/test_commitmask.cpp	Wed Sep 11 17:36:28 2019 +0200
+++ b/test/hotspot/gtest/metaspace/test_commitmask.cpp	Thu Sep 12 07:57:00 2019 +0200
@@ -24,7 +24,9 @@
 
 
 #include "precompiled.hpp"
-#include "metaspace/metaspaceTestsCommon.hpp"
+#include "runtime/os.hpp"
+
+#include "metaspaceTestsCommon.hpp"
 
 static int get_random(int limit) { return os::random() % limit; }
 
@@ -43,8 +45,8 @@
   // Return a random sub range within [_base.._base + word_size),
   // aligned to granule size
   const MetaWord* calc_random_subrange(size_t* p_word_size) {
-    size_t l1 = get_random(_word_size);
-    size_t l2 = get_random(_word_size);
+    size_t l1 = get_random((int)_word_size);
+    size_t l2 = get_random((int)_word_size);
     if (l1 > l2) {
       size_t l = l1;
       l1 = l2;