clang-format: re-format for clang-18
clang-format-18 isn't compatible with the clang-format-17 output, so we
need to reformat the code with the latest version. The way clang-18
handles lambda formatting also changed, so we have made changes to the
organization default style format to better handle lambda formatting.
See I5e08687e696dd240402a2780158664b7113def0e for updated style.
See Iea0776aaa7edd483fa395e23de25ebf5a6288f71 for clang-18 enablement.
Change-Id: Id2036ab746164981596b3ee36259f3ca5d3f1334
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
diff --git a/src/ipmi_to_redfish_hooks.cpp b/src/ipmi_to_redfish_hooks.cpp
index 98ee532..d2eac78 100644
--- a/src/ipmi_to_redfish_hooks.cpp
+++ b/src/ipmi_to_redfish_hooks.cpp
@@ -49,8 +49,8 @@
// Walk through the SEL request record to build the appropriate Redfish
// message
static constexpr std::string_view openBMCMessageRegistryVersion = "0.1";
- std::string messageID = "OpenBMC." +
- std::string(openBMCMessageRegistryVersion);
+ std::string messageID =
+ "OpenBMC." + std::string(openBMCMessageRegistryVersion);
std::vector<std::string> messageArgs;
BIOSSensors sensor = static_cast<BIOSSensors>(selData.sensorNum);
BIOSEventTypes eventType = static_cast<BIOSEventTypes>(selData.eventType);
@@ -296,8 +296,8 @@
}
else
{
- std::string messageArgsString = boost::algorithm::join(messageArgs,
- ",");
+ std::string messageArgsString =
+ boost::algorithm::join(messageArgs, ",");
phosphor::logging::log<phosphor::logging::level::INFO>(
journalMsg.c_str(),
phosphor::logging::entry("REDFISH_MESSAGE_ID=%s",
@@ -319,8 +319,8 @@
// Walk through the SEL request record to build the appropriate Redfish
// message
static constexpr std::string_view openBMCMessageRegistryVersion = "0.1";
- std::string messageID = "OpenBMC." +
- std::string(openBMCMessageRegistryVersion);
+ std::string messageID =
+ "OpenBMC." + std::string(openBMCMessageRegistryVersion);
std::vector<std::string> messageArgs;
BIOSSMISensors sensor = static_cast<BIOSSMISensors>(selData.sensorNum);
BIOSEventTypes eventType = static_cast<BIOSEventTypes>(selData.eventType);
@@ -869,22 +869,23 @@
{
// Save the raw IPMI string of the request
std::string ipmiRaw;
- std::array selBytes = {static_cast<uint8_t>(recordID),
- static_cast<uint8_t>(recordID >> 8),
- recordType,
- static_cast<uint8_t>(timestamp),
- static_cast<uint8_t>(timestamp >> 8),
- static_cast<uint8_t>(timestamp >> 16),
- static_cast<uint8_t>(timestamp >> 24),
- static_cast<uint8_t>(generatorID),
- static_cast<uint8_t>(generatorID >> 8),
- evmRev,
- sensorType,
- sensorNum,
- eventType,
- eventData1,
- eventData2,
- eventData3};
+ std::array selBytes = {
+ static_cast<uint8_t>(recordID),
+ static_cast<uint8_t>(recordID >> 8),
+ recordType,
+ static_cast<uint8_t>(timestamp),
+ static_cast<uint8_t>(timestamp >> 8),
+ static_cast<uint8_t>(timestamp >> 16),
+ static_cast<uint8_t>(timestamp >> 24),
+ static_cast<uint8_t>(generatorID),
+ static_cast<uint8_t>(generatorID >> 8),
+ evmRev,
+ sensorType,
+ sensorNum,
+ eventType,
+ eventData1,
+ eventData2,
+ eventData3};
redfish_hooks::toHexStr(boost::beast::span<uint8_t>(selBytes), ipmiRaw);
// First check that this is a system event record type since that
@@ -896,12 +897,13 @@
}
// Extract the SEL data for the hook
- redfish_hooks::SELData selData = {.generatorID = generatorID,
- .sensorNum = sensorNum,
- .eventType = eventType,
- .offset = eventData1 & 0x0F,
- .eventData2 = eventData2,
- .eventData3 = eventData3};
+ redfish_hooks::SELData selData = {
+ .generatorID = generatorID,
+ .sensorNum = sensorNum,
+ .eventType = eventType,
+ .offset = eventData1 & 0x0F,
+ .eventData2 = eventData2,
+ .eventData3 = eventData3};
return redfish_hooks::startRedfishHook(selData, ipmiRaw);
}
@@ -912,24 +914,26 @@
{
// Save the raw IPMI string of the selData
std::string ipmiRaw;
- std::array selBytes = {static_cast<uint8_t>(generatorID),
- static_cast<uint8_t>(generatorID >> 8),
- evmRev,
- sensorType,
- sensorNum,
- eventType,
- eventData1,
- eventData2,
- eventData3};
+ std::array selBytes = {
+ static_cast<uint8_t>(generatorID),
+ static_cast<uint8_t>(generatorID >> 8),
+ evmRev,
+ sensorType,
+ sensorNum,
+ eventType,
+ eventData1,
+ eventData2,
+ eventData3};
redfish_hooks::toHexStr(boost::beast::span<uint8_t>(selBytes), ipmiRaw);
// Extract the SEL data for the hook
- redfish_hooks::SELData selData = {.generatorID = generatorID,
- .sensorNum = sensorNum,
- .eventType = eventType,
- .offset = eventData1 & 0x0F,
- .eventData2 = eventData2,
- .eventData3 = eventData3};
+ redfish_hooks::SELData selData = {
+ .generatorID = generatorID,
+ .sensorNum = sensorNum,
+ .eventType = eventType,
+ .offset = eventData1 & 0x0F,
+ .eventData2 = eventData2,
+ .eventData3 = eventData3};
return redfish_hooks::startRedfishHook(selData, ipmiRaw);
}