summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--isisd/isis_adjacency.c11
-rw-r--r--isisd/isis_pdu_counter.c4
-rw-r--r--isisd/isis_spf.c19
-rw-r--r--isisd/isis_te.c3
-rw-r--r--isisd/isisd.c4
5 files changed, 29 insertions, 12 deletions
diff --git a/isisd/isis_adjacency.c b/isisd/isis_adjacency.c
index 0957c897e..a88789740 100644
--- a/isisd/isis_adjacency.c
+++ b/isisd/isis_adjacency.c
@@ -484,9 +484,11 @@ const char *isis_adj_yang_state(enum isis_adj_state state)
return "up";
case ISIS_ADJ_INITIALIZING:
return "init";
- default:
+ case ISIS_ADJ_UNKNOWN:
return "failed";
}
+
+ assert(!"Reached end of function where we are not expecting to");
}
void isis_adj_expire(struct thread *thread)
@@ -954,8 +956,9 @@ int isis_adj_usage2levels(enum isis_adj_usage usage)
return IS_LEVEL_2;
case ISIS_ADJ_LEVEL1AND2:
return IS_LEVEL_1 | IS_LEVEL_2;
- default:
- break;
+ case ISIS_ADJ_NONE:
+ return 0;
}
- return 0;
+
+ assert(!"Reached end of function where we are not expecting to");
}
diff --git a/isisd/isis_pdu_counter.c b/isisd/isis_pdu_counter.c
index ec2a0c207..bc1a57ccf 100644
--- a/isisd/isis_pdu_counter.c
+++ b/isisd/isis_pdu_counter.c
@@ -77,9 +77,11 @@ static const char *pdu_counter_index_to_name(enum pdu_counter_index index)
return "L1 PSNP";
case L2_PARTIAL_SEQ_NUM_INDEX:
return "L2 PSNP";
- default:
+ case PDU_COUNTER_SIZE:
return "???????";
}
+
+ assert(!"Reached end of function where we were not expecting to");
}
void pdu_counter_count(pdu_counter_t counter, uint8_t pdu_type)
diff --git a/isisd/isis_spf.c b/isisd/isis_spf.c
index a6eef75e7..22625ed24 100644
--- a/isisd/isis_spf.c
+++ b/isisd/isis_spf.c
@@ -1587,8 +1587,8 @@ static void spf_path_process(struct isis_spftree *spftree,
vertex->N.ip.priority = priority;
if (vertex->depth == 1 || listcount(vertex->Adj_N) > 0) {
struct isis_spftree *pre_spftree;
- struct route_table *route_table;
- bool allow_ecmp;
+ struct route_table *route_table = NULL;
+ bool allow_ecmp = false;
switch (spftree->type) {
case SPF_TYPE_RLFA:
@@ -1606,7 +1606,8 @@ static void spf_path_process(struct isis_spftree *spftree,
return;
}
break;
- default:
+ case SPF_TYPE_FORWARD:
+ case SPF_TYPE_REVERSE:
break;
}
@@ -1624,7 +1625,8 @@ static void spf_path_process(struct isis_spftree *spftree,
pre_spftree->lfa.protection_counters
.tilfa[vertex->N.ip.priority] += 1;
break;
- default:
+ case SPF_TYPE_FORWARD:
+ case SPF_TYPE_REVERSE:
route_table = spftree->route_table;
allow_ecmp = true;
@@ -1699,7 +1701,14 @@ static void isis_spf_loop(struct isis_spftree *spftree,
VTYPE_IPREACH_TE))
continue;
break;
- default:
+ case VTYPE_PSEUDO_IS:
+ case VTYPE_PSEUDO_TE_IS:
+ case VTYPE_NONPSEUDO_IS:
+ case VTYPE_NONPSEUDO_TE_IS:
+ case VTYPE_ES:
+ case VTYPE_IPREACH_TE:
+ case VTYPE_IP6REACH_INTERNAL:
+ case VTYPE_IP6REACH_EXTERNAL:
break;
}
diff --git a/isisd/isis_te.c b/isisd/isis_te.c
index 155d1e6fe..ed915c456 100644
--- a/isisd/isis_te.c
+++ b/isisd/isis_te.c
@@ -1344,7 +1344,8 @@ void isis_te_lsp_event(struct isis_lsp *lsp, enum lsp_event event)
case LSP_DEL:
isis_te_delete_lsp(area->mta, lsp0);
break;
- default:
+ case LSP_UNKNOWN:
+ case LSP_TICK:
break;
}
}
diff --git a/isisd/isisd.c b/isisd/isisd.c
index cd0852547..7e40c21a0 100644
--- a/isisd/isisd.c
+++ b/isisd/isisd.c
@@ -2340,9 +2340,11 @@ static const char *pdu_counter_index_to_name_json(enum pdu_counter_index index)
return "l1-psnp";
case L2_PARTIAL_SEQ_NUM_INDEX:
return "l2-psnp";
- default:
+ case PDU_COUNTER_SIZE:
return "???????";
}
+
+ assert(!"Reached end of function where we are not expecting to");
}
static void common_isis_summary_json(struct json_object *json,