@@ -1177,7 +1177,7 @@ bool Arguments::process_settings_file(const char* file_name, bool should_exist,
11771177 bool in_white_space = true ;
11781178 bool in_comment = false ;
11791179 bool in_quote = false ;
1180- char quote_c = 0 ;
1180+ int quote_c = 0 ;
11811181 bool result = true ;
11821182
11831183 int c = getc (stream);
@@ -1189,7 +1189,7 @@ bool Arguments::process_settings_file(const char* file_name, bool should_exist,
11891189 if (c == ' #' ) in_comment = true ;
11901190 else if (!isspace (c)) {
11911191 in_white_space = false ;
1192- token[pos++] = c ;
1192+ token[pos++] = checked_cast< char >(c) ;
11931193 }
11941194 }
11951195 } else {
@@ -1209,7 +1209,7 @@ bool Arguments::process_settings_file(const char* file_name, bool should_exist,
12091209 } else if (in_quote && (c == quote_c)) {
12101210 in_quote = false ;
12111211 } else {
1212- token[pos++] = c ;
1212+ token[pos++] = checked_cast< char >(c) ;
12131213 }
12141214 }
12151215 c = getc (stream);
@@ -1565,22 +1565,22 @@ void Arguments::set_heap_size() {
15651565 // Convert deprecated flags
15661566 if (FLAG_IS_DEFAULT (MaxRAMPercentage) &&
15671567 !FLAG_IS_DEFAULT (MaxRAMFraction))
1568- MaxRAMPercentage = 100.0 / MaxRAMFraction;
1568+ MaxRAMPercentage = 100.0 / ( double ) MaxRAMFraction;
15691569
15701570 if (FLAG_IS_DEFAULT (MinRAMPercentage) &&
15711571 !FLAG_IS_DEFAULT (MinRAMFraction))
1572- MinRAMPercentage = 100.0 / MinRAMFraction;
1572+ MinRAMPercentage = 100.0 / ( double ) MinRAMFraction;
15731573
15741574 if (FLAG_IS_DEFAULT (InitialRAMPercentage) &&
15751575 !FLAG_IS_DEFAULT (InitialRAMFraction))
1576- InitialRAMPercentage = 100.0 / InitialRAMFraction;
1576+ InitialRAMPercentage = 100.0 / ( double ) InitialRAMFraction;
15771577
15781578 // If the maximum heap size has not been set with -Xmx,
15791579 // then set it as fraction of the size of physical memory,
15801580 // respecting the maximum and minimum sizes of the heap.
15811581 if (FLAG_IS_DEFAULT (MaxHeapSize)) {
1582- julong reasonable_max = (julong)((phys_mem * MaxRAMPercentage) / 100 );
1583- const julong reasonable_min = (julong)((phys_mem * MinRAMPercentage) / 100 );
1582+ julong reasonable_max = (julong)((( double ) phys_mem * MaxRAMPercentage) / 100 );
1583+ const julong reasonable_min = (julong)((( double ) phys_mem * MinRAMPercentage) / 100 );
15841584 if (reasonable_min < MaxHeapSize) {
15851585 // Small physical memory, so use a minimum fraction of it for the heap
15861586 reasonable_max = reasonable_min;
@@ -1664,7 +1664,7 @@ void Arguments::set_heap_size() {
16641664 reasonable_minimum = limit_heap_by_allocatable_memory (reasonable_minimum);
16651665
16661666 if (InitialHeapSize == 0 ) {
1667- julong reasonable_initial = (julong)((phys_mem * InitialRAMPercentage) / 100 );
1667+ julong reasonable_initial = (julong)((( double ) phys_mem * InitialRAMPercentage) / 100 );
16681668 reasonable_initial = limit_heap_by_allocatable_memory (reasonable_initial);
16691669
16701670 reasonable_initial = MAX3 (reasonable_initial, reasonable_minimum, (julong)MinHeapSize);
@@ -1965,15 +1965,15 @@ static const char* system_assertion_options[] = {
19651965 " -dsa" , " -esa" , " -disablesystemassertions" , " -enablesystemassertions" , 0
19661966};
19671967
1968- bool Arguments::parse_uintx (const char * value,
1969- uintx* uintx_arg ,
1970- uintx min_size) {
1971- uintx n;
1968+ bool Arguments::parse_uint (const char * value,
1969+ uint* uint_arg ,
1970+ uint min_size) {
1971+ uint n;
19721972 if (!parse_integer (value, &n)) {
19731973 return false ;
19741974 }
19751975 if (n >= min_size) {
1976- *uintx_arg = n;
1976+ *uint_arg = n;
19771977 return true ;
19781978 } else {
19791979 return false ;
@@ -2728,8 +2728,8 @@ jint Arguments::parse_each_vm_init_arg(const JavaVMInitArgs* args, bool* patch_m
27282728 return JNI_EINVAL;
27292729 }
27302730 } else if (match_option (option, " -XX:MaxTenuringThreshold=" , &tail)) {
2731- uintx max_tenuring_thresh = 0 ;
2732- if (!parse_uintx (tail, &max_tenuring_thresh, 0 )) {
2731+ uint max_tenuring_thresh = 0 ;
2732+ if (!parse_uint (tail, &max_tenuring_thresh, 0 )) {
27332733 jio_fprintf (defaultStream::error_stream (),
27342734 " Improperly specified VM option \' MaxTenuringThreshold=%s\'\n " , tail);
27352735 return JNI_EINVAL;
0 commit comments