]> git.proxmox.com Git - mirror_frr.git/commitdiff
*: silence '-Wchar-subscripts' warnings on NetBSD
authorRenato Westphal <renato@opensourcerouting.org>
Fri, 2 Feb 2018 17:11:03 +0000 (15:11 -0200)
committerRenato Westphal <renato@opensourcerouting.org>
Fri, 2 Feb 2018 18:31:20 +0000 (16:31 -0200)
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
isisd/isis_tlvs.c
lib/command.c
lib/command_graph.c
lib/ptm_lib.c
tools/start-stop-daemon.c
vtysh/vtysh.c

index b7389947b7c0140b8631d3d6640e659be1a69af1..55b0a362f63b17c6ba95364cb76278f9e4cc144c 100644 (file)
@@ -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] = '?';
                }
index 7b9b417839ce7538fa5a3fc7540eb94973750f5d..d17f2c3d48cb99bce0a48420cad0ecb4b9c4db43 100644 (file)
@@ -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;
index fce11a70cc9053deed10e5f03611814ea7d33953..f00b126536e98e4774b7374e9c6a34501821c056 100644 (file)
@@ -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';
 }
index dbfd2dc9f844c645ce0eb6a617b49a18824a53e2..fea5a8cc4015ba6ac858dc1f8a91891b67bcd5e4 100644 (file)
@@ -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++;
                }
index 8dc16f420922be9ebca533e846393a1720350423..6bf55b77405661decbe488af5c3006f4ac705b1a 100644 (file)
@@ -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");
index 097f39fcf0370ae7458f8721736422ade92ba56f..94c4ba43305be2e2e461d978477913bead00ffd2 100644 (file)
@@ -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;