clang-tidy: fix unused parameters warning
Updated the Handler lambda function to include the [[maybe_unused]]
attribute for the unused parameter.
Change-Id: I087e546967eacc3bed838a98e711ee3af3c0136c
Signed-off-by: Jayanth Othayoth <ojayanth@gmail.com>
diff --git a/test/oemrouter_unittest.cpp b/test/oemrouter_unittest.cpp
index 17857a7..f0c0a01 100644
--- a/test/oemrouter_unittest.cpp
+++ b/test/oemrouter_unittest.cpp
@@ -61,8 +61,8 @@
void RegisterTwoWays(ipmi_cmd_t* nextCmd)
{
- Handler f = [](ipmi_cmd_t cmd, const uint8_t* reqBuf, uint8_t* replyBuf,
- size_t* dataLen) {
+ Handler f = [](ipmi_cmd_t cmd, [[maybe_unused]] const uint8_t* reqBuf,
+ uint8_t* replyBuf, size_t* dataLen) {
// Check inputs
EXPECT_EQ(0x78, cmd);
EXPECT_EQ(0, *dataLen); // Excludes OEN
@@ -76,7 +76,7 @@
*nextCmd = ipmi::cmdWildcard;
Handler g = [nextCmd](ipmi_cmd_t cmd, const uint8_t* reqBuf,
- uint8_t* replyBuf, size_t* dataLen) {
+ [[maybe_unused]] uint8_t* replyBuf, size_t* dataLen) {
// Check inputs
EXPECT_EQ(*nextCmd, cmd);
EXPECT_EQ(2, *dataLen); // Excludes OEN