From: Willy Tarreau Date: Thu, 22 Nov 2012 00:04:31 +0000 (+0100) Subject: BUILD: silence a warning on Solaris about usage of isdigit() X-Git-Tag: v1.5-dev13~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=83d84cfc8a59f276653afe93a4f4a675fdfab5e7;p=thirdparty%2Fhaproxy.git BUILD: silence a warning on Solaris about usage of isdigit() On Solaris, isdigit() is a macro and it complains about the use of a char instead of the int for the argument. Let's cast it to an int to silence it. --- diff --git a/src/cfgparse.c b/src/cfgparse.c index 72719dc2ab..c317743202 100644 --- a/src/cfgparse.c +++ b/src/cfgparse.c @@ -1231,7 +1231,7 @@ int cfg_parse_global(const char *file, int linenum, char **args, int kwm) while (*args[cur_arg]) { unsigned int low, high; - if (isdigit(*args[cur_arg])) { + if (isdigit((int)*args[cur_arg])) { char *dash = strchr(args[cur_arg], '-'); low = high = str2uic(args[cur_arg]); @@ -2146,7 +2146,7 @@ int cfg_parse_listen(const char *file, int linenum, char **args, int kwm) else if (strcmp(args[cur_arg], "even") == 0) { set |= 0xAAAAAAAA; } - else if (isdigit(*args[cur_arg])) { + else if (isdigit((int)*args[cur_arg])) { char *dash = strchr(args[cur_arg], '-'); low = high = str2uic(args[cur_arg]); @@ -4599,7 +4599,7 @@ stats_error_parsing: name = end; if (*end == '-') end++; - while (isdigit(*end)) + while (isdigit((int)*end)) end++; newsrv->bind_hdr_occ = strl2ic(name, end-name); } @@ -5032,7 +5032,7 @@ stats_error_parsing: name = end; if (*end == '-') end++; - while (isdigit(*end)) + while (isdigit((int)*end)) end++; curproxy->bind_hdr_occ = strl2ic(name, end-name); } diff --git a/src/dumpstats.c b/src/dumpstats.c index db82005eef..997bdec595 100644 --- a/src/dumpstats.c +++ b/src/dumpstats.c @@ -322,7 +322,7 @@ static int stats_parse_global(char **args, int section_type, struct proxy *curpx else if (strcmp(args[cur_arg], "even") == 0) { set |= 0xAAAAAAAA; } - else if (isdigit(*args[cur_arg])) { + else if (isdigit((int)*args[cur_arg])) { char *dash = strchr(args[cur_arg], '-'); low = high = str2uic(args[cur_arg]);