summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/command.c7
-rw-r--r--lib/command.h1
-rw-r--r--lib/command_graph.c2
-rw-r--r--lib/command_lex.l3
-rw-r--r--lib/defun_lex.l3
-rw-r--r--lib/prefix.h6
-rw-r--r--lib/ptm_lib.c4
-rw-r--r--lib/spf_backoff.c2
-rw-r--r--lib/vty.c2
9 files changed, 10 insertions, 20 deletions
diff --git a/lib/command.c b/lib/command.c
index 83c91c4c60..d17f2c3d48 100644
--- a/lib/command.c
+++ b/lib/command.c
@@ -96,7 +96,6 @@ const char *node_names[] = {
"ldp l2vpn", // LDP_L2VPN_NODE,
"ldp", // LDP_PSEUDOWIRE_NODE,
"isis", // ISIS_NODE,
- "pim", // PIM_NODE,
"masc", // MASC_NODE,
"irdp", // IRDP_NODE,
"static ip", // IP_NODE,
@@ -1308,7 +1307,6 @@ void cmd_exit(struct vty *vty)
case KEYCHAIN_NODE:
case MASC_NODE:
case RMAP_NODE:
- case PIM_NODE:
case VTY_NODE:
vty->node = CONFIG_NODE;
break;
@@ -1414,7 +1412,6 @@ DEFUN (config_end,
case KEYCHAIN_NODE:
case KEYCHAIN_KEY_NODE:
case MASC_NODE:
- case PIM_NODE:
case VTY_NODE:
case LINK_PARAMS_NODE:
vty_config_unlock(vty);
@@ -1865,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;
@@ -1917,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.h b/lib/command.h
index fa8323bf2d..760d40f505 100644
--- a/lib/command.h
+++ b/lib/command.h
@@ -119,7 +119,6 @@ enum node_type {
LDP_L2VPN_NODE, /* LDP L2VPN node */
LDP_PSEUDOWIRE_NODE, /* LDP Pseudowire node */
ISIS_NODE, /* ISIS protocol mode */
- PIM_NODE, /* PIM protocol mode */
MASC_NODE, /* MASC for multicast. */
IRDP_NODE, /* ICMP Router Discovery Protocol mode. */
IP_NODE, /* Static ip route node. */
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/command_lex.l b/lib/command_lex.l
index 436f3a241d..530900659b 100644
--- a/lib/command_lex.l
+++ b/lib/command_lex.l
@@ -23,8 +23,9 @@
*/
%{
-/* ignore harmless bug in old versions of flex */
+/* ignore harmless bugs in old versions of flex */
#pragma GCC diagnostic ignored "-Wsign-compare"
+#pragma GCC diagnostic ignored "-Wmissing-prototypes"
#include "command_parse.h"
diff --git a/lib/defun_lex.l b/lib/defun_lex.l
index 024445be63..87775a0e75 100644
--- a/lib/defun_lex.l
+++ b/lib/defun_lex.l
@@ -34,8 +34,9 @@
* code documentation in it.
*/
-/* ignore harmless bug in old versions of flex */
+/* ignore harmless bugs in old versions of flex */
#pragma GCC diagnostic ignored "-Wsign-compare"
+#pragma GCC diagnostic ignored "-Wunused-value"
#include "config.h"
#include <Python.h>
diff --git a/lib/prefix.h b/lib/prefix.h
index 7e947ea48a..bcc2230607 100644
--- a/lib/prefix.h
+++ b/lib/prefix.h
@@ -39,12 +39,6 @@
#define ETH_ALEN 6
#endif
-/* for compatibility */
-#ifdef ETHER_ADDR_LEN
-#undef ETHER_ADDR_LEN
-#endif
-#define ETHER_ADDR_LEN 6 CPP_WARN("ETHER_ADDR_LEN is being replaced by ETH_ALEN.\\n")
-
#define ETHER_ADDR_STRLEN (3*ETH_ALEN)
/*
* there isn't a portable ethernet address type. We define our
diff --git a/lib/ptm_lib.c b/lib/ptm_lib.c
index 28d26149e5..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++;
}
@@ -347,7 +347,7 @@ int ptm_lib_process_msg(ptm_lib_handle_t *hdl, int fd, char *inbuf, int inlen,
{
int rc, len;
char client_name[32];
- int cmd_id, type, ver, msglen;
+ int cmd_id = 0, type = 0, ver = 0, msglen = 0;
csv_t *csv;
ptm_lib_msg_ctxt_t *p_ctxt = NULL;
diff --git a/lib/spf_backoff.c b/lib/spf_backoff.c
index 92b7620eda..d7907fafdf 100644
--- a/lib/spf_backoff.c
+++ b/lib/spf_backoff.c
@@ -205,7 +205,7 @@ static const char *timeval_format(struct timeval *tv)
size_t offset = strlen(timebuf);
snprintf(timebuf + offset, sizeof(timebuf) - offset, ".%ld",
- tv->tv_usec);
+ (long int)tv->tv_usec);
return timebuf;
}
diff --git a/lib/vty.c b/lib/vty.c
index 4026e0cf8a..43a53b7732 100644
--- a/lib/vty.c
+++ b/lib/vty.c
@@ -732,7 +732,6 @@ static void vty_end_config(struct vty *vty)
case KEYCHAIN_NODE:
case KEYCHAIN_KEY_NODE:
case MASC_NODE:
- case PIM_NODE:
case VTY_NODE:
case BGP_EVPN_VNI_NODE:
vty_config_unlock(vty);
@@ -1130,7 +1129,6 @@ static void vty_stop_input(struct vty *vty)
case KEYCHAIN_NODE:
case KEYCHAIN_KEY_NODE:
case MASC_NODE:
- case PIM_NODE:
case VTY_NODE:
vty_config_unlock(vty);
vty->node = ENABLE_NODE;