Skip to content

Clear Unused Parameter Warnings in EEPROM examples #311

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

Merged
merged 2 commits into from
May 24, 2024
Merged
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
2 changes: 1 addition & 1 deletion libraries/BlockDevices/HeapBlockDevice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
9 changes: 6 additions & 3 deletions libraries/BlockDevices/ReadOnlyBlockDevice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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;
}
Expand Down
Loading