[CLEANUP] shut warnings 'is*' macros from ctype.h on solaris
Solaris visibly uses an array for is*, which returns warnings about the use of signed chars as indexes. Good opportunity to put casts everywhere.
This commit is contained in:
parent
a590983fe5
commit
8f8e645066
@ -324,7 +324,7 @@ int acl_parse_int(const char **text, struct acl_pattern *pattern, int *opaque)
|
|||||||
const char *ptr = *text;
|
const char *ptr = *text;
|
||||||
|
|
||||||
|
|
||||||
while (!isdigit(*ptr)) {
|
while (!isdigit((unsigned char)*ptr)) {
|
||||||
if (strcmp(ptr, "eq") == 0) *opaque = 0;
|
if (strcmp(ptr, "eq") == 0) *opaque = 0;
|
||||||
else if (strcmp(ptr, "gt") == 0) *opaque = 1;
|
else if (strcmp(ptr, "gt") == 0) *opaque = 1;
|
||||||
else if (strcmp(ptr, "ge") == 0) *opaque = 2;
|
else if (strcmp(ptr, "ge") == 0) *opaque = 2;
|
||||||
|
@ -1335,7 +1335,7 @@ int cfg_parse_listen(const char *file, int linenum, char **args)
|
|||||||
if (rport) {
|
if (rport) {
|
||||||
*rport++ = 0;
|
*rport++ = 0;
|
||||||
realport = atol(rport);
|
realport = atol(rport);
|
||||||
if (!isdigit((int)*rport))
|
if (!isdigit((unsigned char)*rport))
|
||||||
newsrv->state |= SRV_MAPPORTS;
|
newsrv->state |= SRV_MAPPORTS;
|
||||||
} else {
|
} else {
|
||||||
realport = 0;
|
realport = 0;
|
||||||
@ -2264,7 +2264,7 @@ int readcfgfile(const char *file)
|
|||||||
end = line + strlen(line);
|
end = line + strlen(line);
|
||||||
|
|
||||||
/* skip leading spaces */
|
/* skip leading spaces */
|
||||||
while (isspace((int)*line))
|
while (isspace((unsigned char)*line))
|
||||||
line++;
|
line++;
|
||||||
|
|
||||||
arg = 0;
|
arg = 0;
|
||||||
@ -2318,10 +2318,10 @@ int readcfgfile(const char *file)
|
|||||||
*line = 0;
|
*line = 0;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
else if (isspace((int)*line)) {
|
else if (isspace((unsigned char)*line)) {
|
||||||
/* a non-escaped space is an argument separator */
|
/* a non-escaped space is an argument separator */
|
||||||
*line++ = 0;
|
*line++ = 0;
|
||||||
while (isspace((int)*line))
|
while (isspace((unsigned char)*line))
|
||||||
line++;
|
line++;
|
||||||
args[++arg] = line;
|
args[++arg] = line;
|
||||||
}
|
}
|
||||||
|
@ -4264,7 +4264,7 @@ void manage_client_side_cookies(struct session *t, struct buffer *req)
|
|||||||
while (p1 < cur_end) {
|
while (p1 < cur_end) {
|
||||||
if (*p1 == ';' || *p1 == ',')
|
if (*p1 == ';' || *p1 == ',')
|
||||||
colon = p1;
|
colon = p1;
|
||||||
else if (!isspace((int)*p1))
|
else if (!isspace((unsigned char)*p1))
|
||||||
break;
|
break;
|
||||||
p1++;
|
p1++;
|
||||||
}
|
}
|
||||||
@ -4285,7 +4285,7 @@ void manage_client_side_cookies(struct session *t, struct buffer *req)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
p4 = p3;
|
p4 = p3;
|
||||||
while (p4 < cur_end && !isspace((int)*p4) && *p4 != ';' && *p4 != ',')
|
while (p4 < cur_end && !isspace((unsigned char)*p4) && *p4 != ';' && *p4 != ',')
|
||||||
p4++;
|
p4++;
|
||||||
|
|
||||||
/* here, we have the cookie name between p1 and p2,
|
/* here, we have the cookie name between p1 and p2,
|
||||||
@ -4833,7 +4833,7 @@ void manage_server_side_cookies(struct session *t, struct buffer *rtr)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
p4 = p3;
|
p4 = p3;
|
||||||
while (p4 < cur_end && !isspace((int)*p4) && *p4 != ';')
|
while (p4 < cur_end && !isspace((unsigned char)*p4) && *p4 != ';')
|
||||||
p4++;
|
p4++;
|
||||||
|
|
||||||
/* here, we have the cookie name between p1 and p2,
|
/* here, we have the cookie name between p1 and p2,
|
||||||
@ -5025,7 +5025,7 @@ void check_response_for_cacheability(struct session *t, struct buffer *rtr)
|
|||||||
/* p1 is at the beginning of the value */
|
/* p1 is at the beginning of the value */
|
||||||
p2 = p1;
|
p2 = p1;
|
||||||
|
|
||||||
while (p2 < cur_end && *p2 != '=' && *p2 != ',' && !isspace((int)*p2))
|
while (p2 < cur_end && *p2 != '=' && *p2 != ',' && !isspace((unsigned char)*p2))
|
||||||
p2++;
|
p2++;
|
||||||
|
|
||||||
/* we have a complete value between p1 and p2 */
|
/* we have a complete value between p1 and p2 */
|
||||||
@ -5622,11 +5622,11 @@ acl_fetch_path(struct proxy *px, struct session *l4, void *l7, int dir,
|
|||||||
if (*ptr == '*')
|
if (*ptr == '*')
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if (isalpha(*ptr)) {
|
if (isalpha((unsigned char)*ptr)) {
|
||||||
/* this is a scheme as described by RFC3986, par. 3.1 */
|
/* this is a scheme as described by RFC3986, par. 3.1 */
|
||||||
ptr++;
|
ptr++;
|
||||||
while (ptr < end &&
|
while (ptr < end &&
|
||||||
(isalnum(*ptr) || *ptr == '+' || *ptr == '-' || *ptr == '.'))
|
(isalnum((unsigned char)*ptr) || *ptr == '+' || *ptr == '-' || *ptr == '.'))
|
||||||
ptr++;
|
ptr++;
|
||||||
/* skip '://' */
|
/* skip '://' */
|
||||||
if (ptr == end || *ptr++ != ':')
|
if (ptr == end || *ptr++ != ':')
|
||||||
|
@ -31,7 +31,7 @@ int exp_replace(char *dst, char *src, const char *str, const regmatch_t *matches
|
|||||||
while (*str) {
|
while (*str) {
|
||||||
if (*str == '\\') {
|
if (*str == '\\') {
|
||||||
str++;
|
str++;
|
||||||
if (isdigit((int)*str)) {
|
if (isdigit((unsigned char)*str)) {
|
||||||
int len, num;
|
int len, num;
|
||||||
|
|
||||||
num = *str - '0';
|
num = *str - '0';
|
||||||
@ -74,7 +74,7 @@ const char *check_replace_string(const char *str)
|
|||||||
str++;
|
str++;
|
||||||
if (!*str)
|
if (!*str)
|
||||||
return err;
|
return err;
|
||||||
else if (isdigit((int)*str))
|
else if (isdigit((unsigned char)*str))
|
||||||
err = NULL;
|
err = NULL;
|
||||||
else if (*str == 'x') {
|
else if (*str == 'x') {
|
||||||
str++;
|
str++;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user