Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 2e6f26b

Browse files
committedMay 10, 2024
Silenced Unused Parameter Warnings
1 parent 78b63e9 commit 2e6f26b

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed
 

‎libraries/BlockDevices/ReadOnlyBlockDevice.cpp

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,10 @@
2424

2525
int ReadOnlyBlockDevice::open() { return BLOCK_DEVICE_OK; }
2626
int ReadOnlyBlockDevice::close() { return BLOCK_DEVICE_OK; }
27-
int ReadOnlyBlockDevice::write(const void *buffer, bd_addr_t addr, bd_size_t size) {return BLOCK_DEVICE_OK;}
27+
int ReadOnlyBlockDevice::write(__attribute__((unused)) const void *buffer, __attribute__((unused)) bd_addr_t addr, __attribute__((unused)) bd_size_t size)
28+
{
29+
return BLOCK_DEVICE_OK;
30+
}
2831

2932
ReadOnlyBlockDevice::ReadOnlyBlockDevice(BlockDevice *bd)
3033
: _bd(bd)
@@ -57,12 +60,12 @@ int ReadOnlyBlockDevice::read(void *buffer, bd_addr_t addr, bd_size_t size)
5760
return _bd->read(buffer, addr, size);
5861
}
5962

60-
int ReadOnlyBlockDevice::program(const void *buffer, bd_addr_t addr, bd_size_t size)
63+
int ReadOnlyBlockDevice::program(__attribute__((unused)) const void *buffer, __attribute__((unused)) bd_addr_t addr, __attribute__((unused)) bd_size_t size)
6164
{
6265
return BD_ERROR_WRITE_PROTECTED;
6366
}
6467

65-
int ReadOnlyBlockDevice::erase(bd_addr_t addr, bd_size_t size)
68+
int ReadOnlyBlockDevice::erase(__attribute__((unused)) bd_addr_t addr, __attribute__((unused)) bd_size_t size)
6669
{
6770
return BD_ERROR_WRITE_PROTECTED;
6871
}

0 commit comments

Comments
 (0)
Please sign in to comment.