Skip to content

Commit

Permalink
fix unused variable compile warning
Browse files Browse the repository at this point in the history
  • Loading branch information
PonomarevDA committed Jul 1, 2024
1 parent 25a10a5 commit f457b6f
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions platform_specific/fdcan/cyphal_transport_can.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ namespace cyphal {

typedef struct{
FDCAN_HandleTypeDef* handler;
FDCAN_TxHeaderTypeDef tx_header;
uint8_t rx_buf[8];
size_t err_counter;
size_t tx_counter;
size_t rx_counter;
FDCAN_TxHeaderTypeDef tx_header{};
uint8_t rx_buf[8] = {};
size_t err_counter{0};
size_t tx_counter{0};
size_t rx_counter{0};
} CanDriver;

struct CanFrame {
Expand Down Expand Up @@ -167,6 +167,7 @@ uint8_t CyphalTransportCan::get_rx_queue_size() {


void HAL_FDCAN_RxFifo0Callback(FDCAN_HandleTypeDef *hfdcan, uint32_t RxFifo0ITs) {
(void)RxFifo0ITs;
FDCAN_RxHeaderTypeDef rx_header;
const uint8_t fifo_size = HAL_FDCAN_GetRxFifoFillLevel(&hfdcan1, FDCAN_RX_FIFO0);
cyphal::CanFrame frame;
Expand Down

0 comments on commit f457b6f

Please sign in to comment.