case NB_OP_MOVE:
/* TODO: update configuration. */
break;
- default:
+ case NB_OP_PRE_VALIDATE:
+ case NB_OP_APPLY_FINISH:
+ case NB_OP_GET_ELEM:
+ case NB_OP_GET_NEXT:
+ case NB_OP_GET_KEYS:
+ case NB_OP_LOOKUP_ENTRY:
+ case NB_OP_RPC:
flog_warn(EC_LIB_DEVELOPMENT,
"%s: unknown operation (%u) [xpath %s]", __func__,
operation, xpath_edit);
ret = nb_callback_move(context, nb_node, event, dnode, errmsg,
errmsg_len);
break;
- default:
+ case NB_OP_PRE_VALIDATE:
+ case NB_OP_APPLY_FINISH:
+ case NB_OP_GET_ELEM:
+ case NB_OP_GET_NEXT:
+ case NB_OP_GET_KEYS:
+ case NB_OP_LOOKUP_ENTRY:
+ case NB_OP_RPC:
yang_dnode_get_path(dnode, xpath, sizeof(xpath));
flog_err(EC_LIB_DEVELOPMENT,
"%s: unknown operation (%u) [xpath %s]", __func__,
* 'prepare' phase.
*/
break;
- default:
+ case NB_EV_VALIDATE:
break;
}
}
return "abort";
case NB_EV_APPLY:
return "apply";
- default:
- return "unknown";
}
+
+ assert(!"Reached end of function we should never hit");
}
const char *nb_operation_name(enum nb_operation operation)
return "lookup_entry";
case NB_OP_RPC:
return "rpc";
- default:
- return "unknown";
}
+
+ assert(!"Reached end of function we should never hit");
}
const char *nb_err_name(enum nb_error error)
return "failed to allocate resource";
case NB_ERR_INCONSISTENCY:
return "internal inconsistency";
- default:
- return "unknown";
}
+
+ assert(!"Reached end of function we should never hit");
}
const char *nb_client_name(enum nb_client client)
return "Sysrepo";
case NB_CLIENT_GRPC:
return "gRPC";
- default:
- return "unknown";
+ case NB_CLIENT_PCEP:
+ return "Pcep";
+ case NB_CLIENT_NONE:
+ return "None";
}
+
+ assert(!"Reached end of function we should never hit");
}
static void nb_load_callbacks(const struct frr_yang_module_info *module)