Fixed warnings when compile in c++ projects
This commit is contained in:
parent
0645e007fa
commit
a70c45b251
@ -77,7 +77,7 @@ uint32_t fpc_crc(uint32_t crc, const void *buf, uint32_t size)
|
|||||||
{
|
{
|
||||||
const uint8_t *p;
|
const uint8_t *p;
|
||||||
|
|
||||||
p = buf;
|
p = (const uint8_t *)buf;
|
||||||
crc = crc ^ ~0U;
|
crc = crc ^ ~0U;
|
||||||
|
|
||||||
while (size--) {
|
while (size--) {
|
||||||
|
|||||||
@ -144,7 +144,7 @@ fpc_bep_result_t bmlite_tranceive(HCP_comm_t *hcp_comm)
|
|||||||
bep_result = bmlite_receive(hcp_comm);
|
bep_result = bmlite_receive(hcp_comm);
|
||||||
|
|
||||||
if (bmlite_get_arg(hcp_comm, ARG_RESULT) == FPC_BEP_RESULT_OK) {
|
if (bmlite_get_arg(hcp_comm, ARG_RESULT) == FPC_BEP_RESULT_OK) {
|
||||||
hcp_comm->bep_result = *(int8_t*)hcp_comm->arg.data;
|
hcp_comm->bep_result = (fpc_bep_result_t)*(int8_t*)hcp_comm->arg.data;
|
||||||
} else {
|
} else {
|
||||||
hcp_comm->bep_result = FPC_BEP_RESULT_OK;
|
hcp_comm->bep_result = FPC_BEP_RESULT_OK;
|
||||||
}
|
}
|
||||||
@ -200,7 +200,7 @@ fpc_bep_result_t bmlite_receive(HCP_comm_t *hcp_comm)
|
|||||||
static fpc_bep_result_t _rx_link(HCP_comm_t *hcp_comm)
|
static fpc_bep_result_t _rx_link(HCP_comm_t *hcp_comm)
|
||||||
{
|
{
|
||||||
// Get size, msg and CRC
|
// Get size, msg and CRC
|
||||||
uint16_t result = hcp_comm->read(4, hcp_comm->txrx_buffer, hcp_comm->phy_rx_timeout, NULL);
|
fpc_bep_result_t result = hcp_comm->read(4, hcp_comm->txrx_buffer, hcp_comm->phy_rx_timeout, NULL);
|
||||||
_HPC_pkt_t *pkt = (_HPC_pkt_t *)hcp_comm->txrx_buffer;
|
_HPC_pkt_t *pkt = (_HPC_pkt_t *)hcp_comm->txrx_buffer;
|
||||||
uint16_t size;
|
uint16_t size;
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user