summaryrefslogtreecommitdiffstats
path: root/mgmtd/mgmt_fe_adapter.c
diff options
context:
space:
mode:
authorChristian Hopps <chopps@labn.net>2023-03-21 00:28:42 +0100
committerChristian Hopps <chopps@gmail.com>2023-03-22 06:22:56 +0100
commit0b645fd2168d977878b1cf0d14eff3755ca66e05 (patch)
tree18b64f967378efb5ce65016cebb4931003e9552e /mgmtd/mgmt_fe_adapter.c
parenttests: apply frrbot style requirements (diff)
downloadfrr-0b645fd2168d977878b1cf0d14eff3755ca66e05.tar.xz
frr-0b645fd2168d977878b1cf0d14eff3755ca66e05.zip
lib: mgmtd: fix build warnings (as error)
Signed-off-by: Christian Hopps <chopps@labn.net>
Diffstat (limited to 'mgmtd/mgmt_fe_adapter.c')
-rw-r--r--mgmtd/mgmt_fe_adapter.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/mgmtd/mgmt_fe_adapter.c b/mgmtd/mgmt_fe_adapter.c
index d45630478..6b4f09d9b 100644
--- a/mgmtd/mgmt_fe_adapter.c
+++ b/mgmtd/mgmt_fe_adapter.c
@@ -1222,9 +1222,10 @@ static int mgmt_fe_session_handle_commit_config_req_msg(
"Failed to create a Configuration session!");
return 0;
}
- MGMTD_FE_ADAPTER_DBG(
- "Created txn %llu for session %llu for COMMIT-CFG-REQ",
- session->cfg_txn_id, session->session_id);
+ MGMTD_FE_ADAPTER_DBG("Created txn %" PRIu64
+ " for session %" PRIu64
+ " for COMMIT-CFG-REQ",
+ session->cfg_txn_id, session->session_id);
}
@@ -1273,7 +1274,11 @@ mgmt_fe_adapter_handle_msg(struct mgmt_fe_client_adapter *adapter,
{
struct mgmt_fe_session_ctx *session;
- switch (fe_msg->message_case) {
+ /*
+ * protobuf-c adds a max size enum with an internal, and changing by
+ * version, name; cast to an int to avoid unhandled enum warnings
+ */
+ switch ((int)fe_msg->message_case) {
case MGMTD__FE_MESSAGE__MESSAGE_REGISTER_REQ:
MGMTD_FE_ADAPTER_DBG("Got Register Req Msg from '%s'",
fe_msg->register_req->client_name);
@@ -1397,9 +1402,6 @@ mgmt_fe_adapter_handle_msg(struct mgmt_fe_client_adapter *adapter,
case MGMTD__FE_MESSAGE__MESSAGE_GETCFG_REPLY:
case MGMTD__FE_MESSAGE__MESSAGE_GETDATA_REPLY:
case MGMTD__FE_MESSAGE__MESSAGE__NOT_SET:
-#if PROTOBUF_C_VERSION_NUMBER >= 1003000
- case _MGMTD__FE_MESSAGE__MESSAGE_IS_INT_SIZE:
-#endif
default:
/*
* A 'default' case is being added contrary to the