fixing most warning when compiling nr-softmodem
This commit is contained in:
@@ -496,7 +496,7 @@ void nfapi_nr_send_pnf_start_resp(nfapi_pnf_config_t *config, uint16_t phy_id) {
|
||||
memset(&start_resp, 0, sizeof(start_resp));
|
||||
start_resp.header.message_id = NFAPI_NR_PHY_MSG_TYPE_START_RESPONSE;
|
||||
start_resp.header.phy_id = phy_id;
|
||||
start_resp.error_code = NFAPI_MSG_OK;
|
||||
start_resp.error_code = NFAPI_NR_START_MSG_OK;
|
||||
nfapi_nr_pnf_start_resp(config, &start_resp);
|
||||
}
|
||||
|
||||
|
||||
@@ -452,7 +452,7 @@ typedef struct
|
||||
// ERROR enums
|
||||
typedef enum { // Table 2-22
|
||||
NFAPI_NR_PARAM_MSG_OK = 0,
|
||||
NFAPI_NR_PARAM_MSG_INVALID_STATE
|
||||
NFAPI_NR_PARAM_MSG_INVALID_STATE
|
||||
} nfapi_nr_param_errors_e;
|
||||
|
||||
typedef enum { // Table 2-25
|
||||
@@ -463,7 +463,7 @@ typedef enum { // Table 2-25
|
||||
|
||||
typedef enum { // Table 2-27
|
||||
NFAPI_NR_START_MSG_OK = 0,
|
||||
NFAPI_NR_START_MSG_INVALID_STATE
|
||||
NFAPI_NR_START_MSG_INVALID_STATE
|
||||
} nfapi_nr_start_errors_e;
|
||||
|
||||
//PNF P5 NR
|
||||
|
||||
@@ -7721,7 +7721,7 @@ static int check_unpack_length(nfapi_message_id_e msgId, uint32_t unpackedBufLen
|
||||
return retLen;
|
||||
}
|
||||
|
||||
static int check_nr_unpack_length(nfapi_message_id_e msgId, uint32_t unpackedBufLen)
|
||||
static int check_nr_unpack_length(nfapi_nr_phy_msg_type_e msgId, uint32_t unpackedBufLen)
|
||||
{
|
||||
int retLen = 0;
|
||||
|
||||
@@ -7782,21 +7782,6 @@ static int check_nr_unpack_length(nfapi_message_id_e msgId, uint32_t unpackedBuf
|
||||
retLen = sizeof(nfapi_nr_ul_node_sync_t);
|
||||
break;
|
||||
|
||||
case NFAPI_TIMING_INFO:
|
||||
if (unpackedBufLen >= sizeof(nfapi_timing_info_t))
|
||||
retLen = sizeof(nfapi_timing_info_t);
|
||||
break;
|
||||
|
||||
case NFAPI_UE_RELEASE_REQUEST:
|
||||
if (unpackedBufLen >= sizeof(nfapi_ue_release_request_t))
|
||||
retLen = sizeof(nfapi_ue_release_request_t);
|
||||
break;
|
||||
|
||||
case NFAPI_UE_RELEASE_RESPONSE:
|
||||
if (unpackedBufLen >= sizeof(nfapi_ue_release_response_t))
|
||||
retLen = sizeof(nfapi_ue_release_response_t);
|
||||
break;
|
||||
|
||||
default:
|
||||
NFAPI_TRACE(NFAPI_TRACE_ERROR, "Unknown message ID %d\n", msgId);
|
||||
break;
|
||||
@@ -8148,7 +8133,7 @@ int nfapi_nr_p7_message_unpack(void *pMessageBuf, uint32_t messageBufLen, void *
|
||||
return -1;
|
||||
break;
|
||||
case NFAPI_UE_RELEASE_REQUEST:
|
||||
if (check_nr_unpack_length(NFAPI_UE_RELEASE_REQUEST, unpackedBufLen))
|
||||
if (check_unpack_length(NFAPI_UE_RELEASE_REQUEST, unpackedBufLen))
|
||||
result = unpack_ue_release_request(&pReadPackedMessage, end, pMessageHeader, config);
|
||||
else
|
||||
return -1;
|
||||
@@ -8228,14 +8213,14 @@ int nfapi_nr_p7_message_unpack(void *pMessageBuf, uint32_t messageBufLen, void *
|
||||
break;
|
||||
|
||||
case NFAPI_TIMING_INFO:
|
||||
if (check_nr_unpack_length(NFAPI_TIMING_INFO, unpackedBufLen))
|
||||
if (check_unpack_length(NFAPI_TIMING_INFO, unpackedBufLen))
|
||||
result = unpack_nr_timing_info(&pReadPackedMessage, end, pMessageHeader, config);
|
||||
else
|
||||
return -1;
|
||||
break;
|
||||
|
||||
case NFAPI_UE_RELEASE_RESPONSE:
|
||||
if (check_nr_unpack_length(NFAPI_UE_RELEASE_RESPONSE, unpackedBufLen))
|
||||
if (check_unpack_length(NFAPI_UE_RELEASE_RESPONSE, unpackedBufLen))
|
||||
result = unpack_ue_release_resp(&pReadPackedMessage, end, pMessageHeader, config);
|
||||
else
|
||||
return -1;
|
||||
|
||||
@@ -831,7 +831,7 @@ void pnf_nr_handle_start_request(pnf_t* pnf, void *pRecvMsg, int recvMsgLen)
|
||||
memset(&resp, 0, sizeof(resp));
|
||||
resp.header.message_id = NFAPI_NR_PHY_MSG_TYPE_START_RESPONSE;
|
||||
resp.header.phy_id = req.header.phy_id;
|
||||
resp.error_code = NFAPI_MSG_INVALID_STATE;
|
||||
resp.error_code = NFAPI_NR_START_MSG_INVALID_STATE;
|
||||
nfapi_nr_pnf_start_resp(config, &resp);
|
||||
}
|
||||
}
|
||||
@@ -841,7 +841,7 @@ void pnf_nr_handle_start_request(pnf_t* pnf, void *pRecvMsg, int recvMsgLen)
|
||||
memset(&resp, 0, sizeof(resp));
|
||||
resp.header.message_id = NFAPI_NR_PHY_MSG_TYPE_START_RESPONSE;
|
||||
resp.header.phy_id = req.header.phy_id;
|
||||
resp.error_code = NFAPI_MSG_INVALID_CONFIG;
|
||||
resp.error_code = NFAPI_NR_START_MSG_INVALID_STATE;
|
||||
nfapi_nr_pnf_start_resp(config, &resp);
|
||||
}
|
||||
}
|
||||
@@ -851,7 +851,7 @@ void pnf_nr_handle_start_request(pnf_t* pnf, void *pRecvMsg, int recvMsgLen)
|
||||
memset(&resp, 0, sizeof(resp));
|
||||
resp.header.message_id = NFAPI_NR_PHY_MSG_TYPE_START_RESPONSE;
|
||||
resp.header.phy_id = req.header.phy_id;
|
||||
resp.error_code = NFAPI_MSG_INVALID_STATE;
|
||||
resp.error_code = NFAPI_NR_START_MSG_INVALID_STATE;
|
||||
nfapi_nr_pnf_start_resp(config, &resp);
|
||||
}
|
||||
}
|
||||
@@ -2309,7 +2309,7 @@ int pnf_message_pump(pnf_t* pnf)
|
||||
}
|
||||
|
||||
// Drop back to idle if we have lost connection
|
||||
pnf->_public.state = NFAPI_PNF_PHY_IDLE;
|
||||
pnf->_public.state = NFAPI_PNF_IDLE;
|
||||
|
||||
|
||||
// close the connection and socket
|
||||
@@ -2370,7 +2370,7 @@ int pnf_nr_message_pump(pnf_t* pnf)
|
||||
}
|
||||
|
||||
// Drop back to idle if we have lost connection
|
||||
pnf->_public.state = NFAPI_PNF_PHY_IDLE;
|
||||
pnf->_public.state = NFAPI_PNF_IDLE;
|
||||
|
||||
|
||||
// close the connection and socket
|
||||
|
||||
Reference in New Issue
Block a user