treewide: Cleanup pedantic C++ warnings
Change-Id: I9c770506d78bd30dde1903645d9bfe92bceab44d
Signed-off-by: William A. Kennington III <wak@google.com>
diff --git a/pcie_i2c.cpp b/pcie_i2c.cpp
index c587c76..2ccba89 100644
--- a/pcie_i2c.cpp
+++ b/pcie_i2c.cpp
@@ -55,11 +55,10 @@
uint8_t subcommand;
uint8_t i2c_bus_number;
uint8_t pcie_slot_name_len;
- uint8_t pcie_slot_name[0];
} __attribute__((packed));
-ipmi_ret_t pcieSlotCount(const uint8_t* reqBuf, uint8_t* replyBuf,
- size_t* dataLen, HandlerInterface* handler)
+ipmi_ret_t pcieSlotCount(const uint8_t*, uint8_t* replyBuf, size_t* dataLen,
+ HandlerInterface* handler)
{
if ((*dataLen) < sizeof(struct PcieSlotCountRequest))
{
@@ -134,8 +133,7 @@
// Copy the i2c bus number and the pcie slot name to the reply struct.
reply->i2c_bus_number = i2c_bus_number;
reply->pcie_slot_name_len = pcie_slot_name.length();
- std::memcpy(reply->pcie_slot_name, pcie_slot_name.c_str(),
- pcie_slot_name.length());
+ std::memcpy(reply + 1, pcie_slot_name.c_str(), pcie_slot_name.length());
// Return the subcommand and the result.
(*dataLen) = length;