Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduce the number of compiler warnings #96

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions cores/arduino/IRQManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ bool IRQManager::addPeripheral(Peripheral_t p, void *cfg) {
if(p == IRQ_USB && cfg != NULL) {
USBIrqCfg_t *irqcfg = (USBIrqCfg_t *)cfg;

if (irqcfg->first_irq_number != FSP_INVALID_VECTOR) {
if (irqcfg->first_irq_number != (uint32_t)FSP_INVALID_VECTOR) {
// already configured, return
goto end_config;
}
Expand Down Expand Up @@ -405,7 +405,7 @@ bool IRQManager::addPeripheral(Peripheral_t p, void *cfg) {
else if(p == IRQ_USB_HS && cfg != NULL) {
USBIrqCfg_t *irqcfg = (USBIrqCfg_t *)cfg;

if (irqcfg->first_irq_number != FSP_INVALID_VECTOR) {
if (irqcfg->first_irq_number != (uint32_t)FSP_INVALID_VECTOR) {
// already configured, return
goto end_config;
}
Expand Down Expand Up @@ -1659,7 +1659,7 @@ void IRQManager::set_can_tx_link_event(int li, int ch)
#endif
}

void IRQManager::set_canfd_error_link_event(int li, int ch)
void IRQManager::set_canfd_error_link_event(__attribute__((unused)) int li, __attribute__((unused)) int ch)
{
if (0) {}
#ifdef ELC_EVENT_CAN0_CHERR
Expand All @@ -1674,7 +1674,7 @@ void IRQManager::set_canfd_error_link_event(int li, int ch)
#endif
}

void IRQManager::set_canfd_rx_link_event(int li, int ch)
void IRQManager::set_canfd_rx_link_event(__attribute__((unused)) int li, __attribute__((unused)) int ch)
{
if (0) {}
#ifdef ELC_EVENT_CAN0_COMFRX
Expand All @@ -1689,7 +1689,7 @@ void IRQManager::set_canfd_rx_link_event(int li, int ch)
#endif
}

void IRQManager::set_canfd_tx_link_event(int li, int ch)
void IRQManager::set_canfd_tx_link_event(__attribute__((unused)) int li, __attribute__((unused)) int ch)
{
if (0) {}
#ifdef ELC_EVENT_CAN0_TX
Expand Down
6 changes: 3 additions & 3 deletions cores/arduino/cm_backtrace/cm_backtrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,9 @@ static const char * const print_info[] = {
#endif
};

static char* fw_name;
static char* hw_ver;
static char* sw_ver;
static const char* fw_name;
static const char* hw_ver;
static const char* sw_ver;
static uint32_t main_stack_start_addr = 0;
static size_t main_stack_size = 0;
static uint32_t code_start_addr = 0;
Expand Down