From 4b3a1f1e57327c9a5e25898bca63fc77214de9f9 Mon Sep 17 00:00:00 2001 From: Maksym Lunin Date: Sun, 20 Nov 2016 01:49:04 +0200 Subject: [PATCH] unused parameter warning fix --- cores/esp8266/core_esp8266_main.cpp | 4 ++-- cores/esp8266/spiffs_api.h | 2 +- libraries/ESP8266WiFi/src/ESP8266WiFiGeneric.cpp | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/cores/esp8266/core_esp8266_main.cpp b/cores/esp8266/core_esp8266_main.cpp index 13bb645e25..4f286252ef 100644 --- a/cores/esp8266/core_esp8266_main.cpp +++ b/cores/esp8266/core_esp8266_main.cpp @@ -51,7 +51,7 @@ const char* core_release = #endif } // extern "C" -int atexit(void (*func)()) { +int atexit(void (*func)() __attribute__((unused))) { return 0; } @@ -124,7 +124,7 @@ static void loop_wrapper() { esp_schedule(); } -static void loop_task(os_event_t *events) { +static void loop_task(os_event_t *events __attribute__((unused))) { g_micros_at_task_start = system_get_time(); cont_run(&g_cont, &loop_wrapper); if (cont_check(&g_cont) != 0) { diff --git a/cores/esp8266/spiffs_api.h b/cores/esp8266/spiffs_api.h index f98df1195b..b641f0ef84 100644 --- a/cores/esp8266/spiffs_api.h +++ b/cores/esp8266/spiffs_api.h @@ -269,7 +269,7 @@ class SPIFFSFileImpl : public FileImpl : _fs(fs) , _fd(fd) , _stat({0}) - , _written(false) + , _written(false) { _getStat(); } diff --git a/libraries/ESP8266WiFi/src/ESP8266WiFiGeneric.cpp b/libraries/ESP8266WiFi/src/ESP8266WiFiGeneric.cpp index 5b9f8ac46e..15ad86cdbf 100644 --- a/libraries/ESP8266WiFi/src/ESP8266WiFiGeneric.cpp +++ b/libraries/ESP8266WiFi/src/ESP8266WiFiGeneric.cpp @@ -152,7 +152,7 @@ WiFiEventHandler ESP8266WiFiGenericClass::onStationModeGotIP(std::function f) { - WiFiEventHandler handler = std::make_shared(WIFI_EVENT_STAMODE_DHCP_TIMEOUT, [f](System_Event_t* e){ + WiFiEventHandler handler = std::make_shared(WIFI_EVENT_STAMODE_DHCP_TIMEOUT, [f](System_Event_t* e __attribute__((unused))){ f(); }); sCbEventList.push_back(handler); @@ -451,7 +451,7 @@ int ESP8266WiFiGenericClass::hostByName(const char* aHostname, IPAddress& aResul * @param ipaddr * @param callback_arg */ -void wifi_dns_found_callback(const char *name, ip_addr_t *ipaddr, void *callback_arg) { +void wifi_dns_found_callback(const char *name __attribute__((unused)), ip_addr_t *ipaddr, void *callback_arg) { if(ipaddr) { (*reinterpret_cast(callback_arg)) = ipaddr->addr; }