From a07302437a589d76563232f97c4a7bfda4c25902 Mon Sep 17 00:00:00 2001 From: pennam Date: Thu, 13 Feb 2025 12:35:21 +0100 Subject: [PATCH 1/3] CEthernet: suppress unused variable warning --- libraries/Ethernet/src/Ethernet.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libraries/Ethernet/src/Ethernet.cpp b/libraries/Ethernet/src/Ethernet.cpp index c63635096..993ea2372 100644 --- a/libraries/Ethernet/src/Ethernet.cpp +++ b/libraries/Ethernet/src/Ethernet.cpp @@ -123,6 +123,8 @@ int CEthernet::begin(uint8_t *mac_address, IPAddress local_ip, IPAddress dns_ser /* -------------------------------------------------------------------------- */ int CEthernet::begin(uint8_t *mac, IPAddress local_ip, IPAddress dns_server, IPAddress gateway, IPAddress subnet, unsigned long timeout, unsigned long responseTimeout) { /* -------------------------------------------------------------------------- */ + (void)responseTimeout; + (void)timeout; CLwipIf::getInstance().setMacAddress(NI_ETHERNET, mac); return begin(local_ip, dns_server, gateway, subnet); } From c36e24a435a27b4f6b1b82938e66b4c59c03cbb6 Mon Sep 17 00:00:00 2001 From: pennam Date: Thu, 13 Feb 2025 12:36:01 +0100 Subject: [PATCH 2/3] EthernetDriver: remove line with no effect --- libraries/Ethernet/src/EthernetDriver.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/libraries/Ethernet/src/EthernetDriver.cpp b/libraries/Ethernet/src/EthernetDriver.cpp index 70eaf43d1..4a1115d82 100644 --- a/libraries/Ethernet/src/EthernetDriver.cpp +++ b/libraries/Ethernet/src/EthernetDriver.cpp @@ -195,7 +195,6 @@ void eth_reset_due_to_ADE_bit() { /* -------------------------------------------------------------------------- */ void EthernetDriver::irq_callback(ether_callback_args_t * p_args) { /* -------------------------------------------------------------------------- */ - p_args->status_ecsr; uint32_t reg_eesr = p_args->status_eesr; if(p_args->channel == ETHERNET_CHANNEL) { if(p_args->event == ETHER_EVENT_WAKEON_LAN) { From c439b6e4f2b1811ba6f841f3b0df18c9497f27ee Mon Sep 17 00:00:00 2001 From: pennam Date: Thu, 13 Feb 2025 12:37:33 +0100 Subject: [PATCH 3/3] EthernetClock: fix stop() logic to avoid missing return value warning --- libraries/Ethernet/src/EthernetClock.cpp | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/libraries/Ethernet/src/EthernetClock.cpp b/libraries/Ethernet/src/EthernetClock.cpp index a38fbe5ea..aa5e3f39f 100644 --- a/libraries/Ethernet/src/EthernetClock.cpp +++ b/libraries/Ethernet/src/EthernetClock.cpp @@ -49,17 +49,14 @@ fsp_err_t EthernetClock::stop() { fsp_err_t err = R_AGT_Stop(&this->TIMER_ETHERNET_ctrl); if (err != FSP_SUCCESS) { return err; - } else { - err = R_AGT_Close(&this->TIMER_ETHERNET_ctrl); - if (err != FSP_SUCCESS) { - return err; - } else { - err = R_AGT_Disable(&this->TIMER_ETHERNET_ctrl); - if (err != FSP_SUCCESS) { - return err; - } - } } + + err = R_AGT_Close(&this->TIMER_ETHERNET_ctrl); + if (err != FSP_SUCCESS) { + return err; + } + + return R_AGT_Disable(&this->TIMER_ETHERNET_ctrl); } #else