mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-08 12:36:20 +00:00
*: silence '-Wchar-subscripts' warnings on NetBSD
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
This commit is contained in:
parent
b599ec55f4
commit
a7ce0ad1da
@ -1312,7 +1312,7 @@ static int unpack_tlv_dynamic_hostname(enum isis_tlv_context context,
|
|||||||
bool sane = true;
|
bool sane = true;
|
||||||
for (uint8_t i = 0; i < tlv_len; i++) {
|
for (uint8_t i = 0; i < tlv_len; i++) {
|
||||||
if ((unsigned char)tlvs->hostname[i] > 127
|
if ((unsigned char)tlvs->hostname[i] > 127
|
||||||
|| !isprint(tlvs->hostname[i])) {
|
|| !isprint((int)tlvs->hostname[i])) {
|
||||||
sane = false;
|
sane = false;
|
||||||
tlvs->hostname[i] = '?';
|
tlvs->hostname[i] = '?';
|
||||||
}
|
}
|
||||||
|
@ -1862,7 +1862,7 @@ DEFUN (config_password,
|
|||||||
return CMD_SUCCESS;
|
return CMD_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!isalnum(argv[idx_8]->arg[0])) {
|
if (!isalnum((int)argv[idx_8]->arg[0])) {
|
||||||
vty_out(vty,
|
vty_out(vty,
|
||||||
"Please specify string starting with alphanumeric\n");
|
"Please specify string starting with alphanumeric\n");
|
||||||
return CMD_WARNING_CONFIG_FAILED;
|
return CMD_WARNING_CONFIG_FAILED;
|
||||||
@ -1914,7 +1914,7 @@ DEFUN (config_enable_password,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!isalnum(argv[idx_8]->arg[0])) {
|
if (!isalnum((int)argv[idx_8]->arg[0])) {
|
||||||
vty_out(vty,
|
vty_out(vty,
|
||||||
"Please specify string starting with alphanumeric\n");
|
"Please specify string starting with alphanumeric\n");
|
||||||
return CMD_WARNING_CONFIG_FAILED;
|
return CMD_WARNING_CONFIG_FAILED;
|
||||||
|
@ -97,7 +97,7 @@ void cmd_token_varname_set(struct cmd_token *token, const char *varname)
|
|||||||
token->varname[i] = '_';
|
token->varname[i] = '_';
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
token->varname[i] = tolower(varname[i]);
|
token->varname[i] = tolower((int)varname[i]);
|
||||||
}
|
}
|
||||||
token->varname[len] = '\0';
|
token->varname[len] = '\0';
|
||||||
}
|
}
|
||||||
|
@ -120,7 +120,7 @@ static int _ptm_lib_decode_header(csv_t *csv, int *msglen, int *version,
|
|||||||
}
|
}
|
||||||
/* remove leading spaces */
|
/* remove leading spaces */
|
||||||
for (i = j = 0; i < csv_field_len(fld); i++) {
|
for (i = j = 0; i < csv_field_len(fld); i++) {
|
||||||
if (!isspace(hdr[i])) {
|
if (!isspace((int)hdr[i])) {
|
||||||
client_name[j] = hdr[i];
|
client_name[j] = hdr[i];
|
||||||
j++;
|
j++;
|
||||||
}
|
}
|
||||||
|
@ -396,7 +396,7 @@ static void parse_schedule_item(const char *string, struct schedule_item *item)
|
|||||||
|
|
||||||
if (!strcmp(string, "forever")) {
|
if (!strcmp(string, "forever")) {
|
||||||
item->type = sched_forever;
|
item->type = sched_forever;
|
||||||
} else if (isdigit(string[0])) {
|
} else if (isdigit((int)string[0])) {
|
||||||
item->type = sched_timeout;
|
item->type = sched_timeout;
|
||||||
if (parse_integer(string, &item->value) != 0)
|
if (parse_integer(string, &item->value) != 0)
|
||||||
badusage("invalid timeout value in schedule");
|
badusage("invalid timeout value in schedule");
|
||||||
|
@ -504,11 +504,11 @@ static char *trim(char *s)
|
|||||||
return s;
|
return s;
|
||||||
|
|
||||||
end = s + size - 1;
|
end = s + size - 1;
|
||||||
while (end >= s && isspace(*end))
|
while (end >= s && isspace((int)*end))
|
||||||
end--;
|
end--;
|
||||||
*(end + 1) = '\0';
|
*(end + 1) = '\0';
|
||||||
|
|
||||||
while (*s && isspace(*s))
|
while (*s && isspace((int)*s))
|
||||||
s++;
|
s++;
|
||||||
|
|
||||||
return s;
|
return s;
|
||||||
|
Loading…
Reference in New Issue
Block a user