@@ -748,7 +748,7 @@ static bool set_bool_flag(JVMFlag* flag, bool value, JVMFlagOrigin origin) {
748748
749749static bool set_fp_numeric_flag (JVMFlag* flag, const char * value, JVMFlagOrigin origin) {
750750 // strtod allows leading whitespace, but our flag format does not.
751- if (*value == ' \0 ' || isspace (*value)) {
751+ if (*value == ' \0 ' || isspace (( unsigned char ) *value)) {
752752 return false ;
753753 }
754754 char * end;
@@ -1178,13 +1178,13 @@ bool Arguments::process_settings_file(const char* file_name, bool should_exist,
11781178 if (c == ' \n ' ) in_comment = false ;
11791179 } else {
11801180 if (c == ' #' ) in_comment = true ;
1181- else if (!isspace (c)) {
1181+ else if (!isspace (( unsigned char ) c)) {
11821182 in_white_space = false ;
11831183 token[pos++] = checked_cast<char >(c);
11841184 }
11851185 }
11861186 } else {
1187- if (c == ' \n ' || (!in_quote && isspace (c))) {
1187+ if (c == ' \n ' || (!in_quote && isspace (( unsigned char ) c))) {
11881188 // token ends at newline, or at unquoted whitespace
11891189 // this allows a way to include spaces in string-valued options
11901190 token[pos] = ' \0 ' ;
@@ -3141,7 +3141,7 @@ jint Arguments::parse_options_buffer(const char* name, char* buffer, const size_
31413141 // parse all options
31423142 while (rd < buffer_end) {
31433143 // skip leading white space from the input string
3144- while (rd < buffer_end && isspace (*rd)) {
3144+ while (rd < buffer_end && isspace (( unsigned char ) *rd)) {
31453145 rd++;
31463146 }
31473147
@@ -3154,7 +3154,7 @@ jint Arguments::parse_options_buffer(const char* name, char* buffer, const size_
31543154
31553155 // Tokens are strings of non white space characters separated
31563156 // by one or more white spaces.
3157- while (rd < buffer_end && !isspace (*rd)) {
3157+ while (rd < buffer_end && !isspace (( unsigned char ) *rd)) {
31583158 if (*rd == ' \' ' || *rd == ' "' ) { // handle a quoted string
31593159 int quote = *rd; // matching quote to look for
31603160 rd++; // don't copy open quote
0 commit comments