From 756142fce5f1a9e9af889a373a14584b1e8fa8a4 Mon Sep 17 00:00:00 2001 From: Henry Gabryjelski Date: Thu, 25 Nov 2021 22:30:01 -0800 Subject: [PATCH 1/3] Avoid `unused parameter` warning The `unused parameter` warning occurs when `EZTIME_CACHE_EEPROM` is defined, but `EZTIME_CACHE_NVS` is not defined. --- src/ezTime.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/ezTime.cpp b/src/ezTime.cpp index 78d4399..2dc8fa1 100644 --- a/src/ezTime.cpp +++ b/src/ezTime.cpp @@ -919,6 +919,7 @@ String Timezone::getPosix() { return _posix; } void Timezone::clearCache(const bool delete_section /* = false */) { #ifdef EZTIME_CACHE_EEPROM + (void)delete_section; // UNUSED_PARAMETER(delete_section); eepromBegin(); if (_eeprom_address < 0) { triggerError(NO_CACHE_SET); return; } for (int16_t n = _eeprom_address; n < _eeprom_address + EEPROM_CACHE_LEN; n++) EEPROM.write(n, 0); From 09861d948936f818fb2e46f17d69eb76910c531d Mon Sep 17 00:00:00 2001 From: Henry Gabryjelski Date: Thu, 25 Nov 2021 23:08:31 -0800 Subject: [PATCH 2/3] Fix compilation error with namespace enabled `-D EZTIME_EZT_NAMESPACE` --- src/ezTime.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ezTime.cpp b/src/ezTime.cpp index 2dc8fa1..7d8e985 100644 --- a/src/ezTime.cpp +++ b/src/ezTime.cpp @@ -841,7 +841,7 @@ String Timezone::getPosix() { return _posix; } info(F(" ms) ")); if (recv.substring(0,6) == "ERROR ") { _server_error = recv.substring(6); - error (SERVER_ERROR); + ezt::error(SERVER_ERROR); return false; } if (recv.substring(0,3) == "OK ") { From 7e46f329672a11d98412d9898c7cc2a1766f774a Mon Sep 17 00:00:00 2001 From: Henry Gabryjelski Date: Thu, 25 Nov 2021 23:14:49 -0800 Subject: [PATCH 3/3] another location needing explicit namespace --- src/ezTime.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ezTime.cpp b/src/ezTime.cpp index 7d8e985..394bca7 100644 --- a/src/ezTime.cpp +++ b/src/ezTime.cpp @@ -856,7 +856,7 @@ String Timezone::getPosix() { return _posix; } #endif return true; } - error (DATA_NOT_FOUND); + ezt::error (DATA_NOT_FOUND); return false; }