From 2e6f26b3332b092f71b93c50004f39d4bf21d5e6 Mon Sep 17 00:00:00 2001 From: David <6957239+delta-G@users.noreply.github.com> Date: Thu, 9 May 2024 22:32:35 -0500 Subject: [PATCH 1/2] Silenced Unused Parameter Warnings --- libraries/BlockDevices/ReadOnlyBlockDevice.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/libraries/BlockDevices/ReadOnlyBlockDevice.cpp b/libraries/BlockDevices/ReadOnlyBlockDevice.cpp index 15b59252c..86c256eb0 100644 --- a/libraries/BlockDevices/ReadOnlyBlockDevice.cpp +++ b/libraries/BlockDevices/ReadOnlyBlockDevice.cpp @@ -24,7 +24,10 @@ int ReadOnlyBlockDevice::open() { return BLOCK_DEVICE_OK; } int ReadOnlyBlockDevice::close() { return BLOCK_DEVICE_OK; } -int ReadOnlyBlockDevice::write(const void *buffer, bd_addr_t addr, bd_size_t size) {return BLOCK_DEVICE_OK;} +int ReadOnlyBlockDevice::write(__attribute__((unused)) const void *buffer, __attribute__((unused)) bd_addr_t addr, __attribute__((unused)) bd_size_t size) +{ + return BLOCK_DEVICE_OK; +} ReadOnlyBlockDevice::ReadOnlyBlockDevice(BlockDevice *bd) : _bd(bd) @@ -57,12 +60,12 @@ int ReadOnlyBlockDevice::read(void *buffer, bd_addr_t addr, bd_size_t size) return _bd->read(buffer, addr, size); } -int ReadOnlyBlockDevice::program(const void *buffer, bd_addr_t addr, bd_size_t size) +int ReadOnlyBlockDevice::program(__attribute__((unused)) const void *buffer, __attribute__((unused)) bd_addr_t addr, __attribute__((unused)) bd_size_t size) { return BD_ERROR_WRITE_PROTECTED; } -int ReadOnlyBlockDevice::erase(bd_addr_t addr, bd_size_t size) +int ReadOnlyBlockDevice::erase(__attribute__((unused)) bd_addr_t addr, __attribute__((unused)) bd_size_t size) { return BD_ERROR_WRITE_PROTECTED; } From aacb54961baf7dcc759aba0a58edaaa274839ad3 Mon Sep 17 00:00:00 2001 From: David <6957239+delta-G@users.noreply.github.com> Date: Thu, 9 May 2024 22:37:11 -0500 Subject: [PATCH 2/2] Silenced Unused Parameter Warnings in HeapBlockDevice --- libraries/BlockDevices/HeapBlockDevice.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/BlockDevices/HeapBlockDevice.cpp b/libraries/BlockDevices/HeapBlockDevice.cpp index a3306d151..12b2363f9 100644 --- a/libraries/BlockDevices/HeapBlockDevice.cpp +++ b/libraries/BlockDevices/HeapBlockDevice.cpp @@ -105,7 +105,7 @@ bd_size_t HeapBlockDevice::get_erase_size() const return _erase_size; } -bd_size_t HeapBlockDevice::get_erase_size(bd_addr_t addr) const +bd_size_t HeapBlockDevice::get_erase_size(__attribute__((unused)) bd_addr_t addr) const { return _erase_size; }