diff --git a/isisd/isis_tlvs.c b/isisd/isis_tlvs.c index b7389947b7..55b0a362f6 100644 --- a/isisd/isis_tlvs.c +++ b/isisd/isis_tlvs.c @@ -1312,7 +1312,7 @@ static int unpack_tlv_dynamic_hostname(enum isis_tlv_context context, bool sane = true; for (uint8_t i = 0; i < tlv_len; i++) { if ((unsigned char)tlvs->hostname[i] > 127 - || !isprint(tlvs->hostname[i])) { + || !isprint((int)tlvs->hostname[i])) { sane = false; tlvs->hostname[i] = '?'; } diff --git a/lib/command.c b/lib/command.c index 7b9b417839..d17f2c3d48 100644 --- a/lib/command.c +++ b/lib/command.c @@ -1862,7 +1862,7 @@ DEFUN (config_password, return CMD_SUCCESS; } - if (!isalnum(argv[idx_8]->arg[0])) { + if (!isalnum((int)argv[idx_8]->arg[0])) { vty_out(vty, "Please specify string starting with alphanumeric\n"); 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, "Please specify string starting with alphanumeric\n"); return CMD_WARNING_CONFIG_FAILED; diff --git a/lib/command_graph.c b/lib/command_graph.c index fce11a70cc..f00b126536 100644 --- a/lib/command_graph.c +++ b/lib/command_graph.c @@ -97,7 +97,7 @@ void cmd_token_varname_set(struct cmd_token *token, const char *varname) token->varname[i] = '_'; break; default: - token->varname[i] = tolower(varname[i]); + token->varname[i] = tolower((int)varname[i]); } token->varname[len] = '\0'; } diff --git a/lib/ptm_lib.c b/lib/ptm_lib.c index dbfd2dc9f8..fea5a8cc40 100644 --- a/lib/ptm_lib.c +++ b/lib/ptm_lib.c @@ -120,7 +120,7 @@ static int _ptm_lib_decode_header(csv_t *csv, int *msglen, int *version, } /* remove leading spaces */ for (i = j = 0; i < csv_field_len(fld); i++) { - if (!isspace(hdr[i])) { + if (!isspace((int)hdr[i])) { client_name[j] = hdr[i]; j++; } diff --git a/tools/start-stop-daemon.c b/tools/start-stop-daemon.c index 8dc16f4209..6bf55b7740 100644 --- a/tools/start-stop-daemon.c +++ b/tools/start-stop-daemon.c @@ -396,7 +396,7 @@ static void parse_schedule_item(const char *string, struct schedule_item *item) if (!strcmp(string, "forever")) { item->type = sched_forever; - } else if (isdigit(string[0])) { + } else if (isdigit((int)string[0])) { item->type = sched_timeout; if (parse_integer(string, &item->value) != 0) badusage("invalid timeout value in schedule"); diff --git a/vtysh/vtysh.c b/vtysh/vtysh.c index 097f39fcf0..94c4ba4330 100644 --- a/vtysh/vtysh.c +++ b/vtysh/vtysh.c @@ -504,11 +504,11 @@ static char *trim(char *s) return s; end = s + size - 1; - while (end >= s && isspace(*end)) + while (end >= s && isspace((int)*end)) end--; *(end + 1) = '\0'; - while (*s && isspace(*s)) + while (*s && isspace((int)*s)) s++; return s;