Skip to content

Commit

Permalink
utils: fix a MSVC warning about size_t/int casts
Browse files Browse the repository at this point in the history
Signed-off-by: Brice Goglin <Brice.Goglin@inria.fr>
  • Loading branch information
bgoglin committed Oct 28, 2021
1 parent 62a924e commit bdedceb
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions utils/hwloc/misc.h
Expand Up @@ -575,17 +575,15 @@ hwloc_utils_parse_flags(char * str, struct hwloc_utils_parsing_flag possible_fla
char *end;
int ul_flag;
int i;
int j = 0;
size_t j;
unsigned long ul_flags = 0;

ul_flag = strtoul(str, &end, 0);
if(end != str && *end == '\0')
return ul_flag;

while (str[j]) {
for(j=0; str[j]; j++)
str[j] = toupper(str[j]);
j++;
}

if(strcmp(str, "NONE") == 0)
return 0;
Expand Down

0 comments on commit bdedceb

Please sign in to comment.