clang-format: copy latest and re-format
clang-format-16 has some backwards incompatible changes that require
additional settings for best compatibility and re-running the formatter.
Copy the latest .clang-format from the docs repository and reformat the
repository.
Change-Id: I75f89d2959b0f1338c20d72ad669fbdc1d720835
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
diff --git a/.clang-format b/.clang-format
index be651e7..d92a3f1 100644
--- a/.clang-format
+++ b/.clang-format
@@ -6,12 +6,14 @@
AlignConsecutiveAssignments: false
AlignConsecutiveDeclarations: false
AlignEscapedNewlines: Right
-AlignOperands: true
-AlignTrailingComments: true
+AlignOperands: Align
+AlignTrailingComments:
+ Kind: Always
+ OverEmptyLines: 1
AllowAllParametersOfDeclarationOnNextLine: true
-AllowShortBlocksOnASingleLine: false
+AllowShortBlocksOnASingleLine: Empty
AllowShortCaseLabelsOnASingleLine: false
-AllowShortFunctionsOnASingleLine: None
+AllowShortFunctionsOnASingleLine: Empty
AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
AlwaysBreakAfterReturnType: None
@@ -36,6 +38,7 @@
SplitEmptyFunction: false
SplitEmptyRecord: false
SplitEmptyNamespace: false
+BreakAfterAttributes: Never
BreakBeforeBinaryOperators: None
BreakBeforeBraces: Custom
BreakBeforeTernaryOperators: true
@@ -49,6 +52,7 @@
ConstructorInitializerIndentWidth: 4
ContinuationIndentWidth: 4
Cpp11BracedListStyle: true
+DeriveLineEnding: false
DerivePointerAlignment: false
PointerAlignment: Left
DisableFormat: false
@@ -74,24 +78,33 @@
- Regex: '.*'
Priority: 6
IndentCaseLabels: true
+IndentRequiresClause: true
IndentWidth: 4
IndentWrappedFunctionNames: true
-KeepEmptyLinesAtTheStartOfBlocks: true
+InsertNewlineAtEOF: true
+KeepEmptyLinesAtTheStartOfBlocks: false
+LambdaBodyIndentation: OuterScope
+LineEnding: LF
MacroBlockBegin: ''
MacroBlockEnd: ''
MaxEmptyLinesToKeep: 1
NamespaceIndentation: None
-LambdaBodyIndentation: OuterScope
ObjCBlockIndentWidth: 2
ObjCSpaceAfterProperty: false
ObjCSpaceBeforeProtocolList: true
+PenaltyBreakAssignment: 25
PenaltyBreakBeforeFirstCallParameter: 19
PenaltyBreakComment: 300
PenaltyBreakFirstLessLess: 120
PenaltyBreakString: 1000
PenaltyExcessCharacter: 1000000
PenaltyReturnTypeOnItsOwnLine: 60
+PenaltyIndentedWhitespace: 0
+QualifierAlignment: Left
+ReferenceAlignment: Left
ReflowComments: true
+RequiresClausePosition: OwnLine
+RequiresExpressionIndentation: Keyword
SortIncludes: true
SortUsingDeclarations: true
SpaceAfterCStyleCast: false
diff --git a/http/app.hpp b/http/app.hpp
index 60c2215..d47cd89 100644
--- a/http/app.hpp
+++ b/http/app.hpp
@@ -116,8 +116,8 @@
}
else
{
- sslServer =
- std::make_unique<ssl_server_t>(this, socketFd, sslContext, io);
+ sslServer = std::make_unique<ssl_server_t>(this, socketFd,
+ sslContext, io);
}
sslServer->run();
diff --git a/http/http_client.hpp b/http/http_client.hpp
index 4201499..8161eb1 100644
--- a/http/http_client.hpp
+++ b/http/http_client.hpp
@@ -536,7 +536,6 @@
void afterSslShutdown(const std::shared_ptr<ConnectionInfo>& /*self*/,
bool retry, const boost::system::error_code& ec)
{
-
if (ec)
{
BMCWEB_LOG_ERROR << host << ":" << std::to_string(port)
diff --git a/http/http_connection.hpp b/http/http_connection.hpp
index 47f9432..c8ae1fd 100644
--- a/http/http_connection.hpp
+++ b/http/http_connection.hpp
@@ -45,8 +45,8 @@
static int connectionCount = 0;
// request body limit size set by the bmcwebHttpReqBodyLimitMb option
-constexpr uint64_t httpReqBodyLimit =
- 1024UL * 1024UL * bmcwebHttpReqBodyLimitMb;
+constexpr uint64_t httpReqBodyLimit = 1024UL * 1024UL *
+ bmcwebHttpReqBodyLimitMb;
constexpr uint64_t loggedOutPostBodyLimit = 4096;
diff --git a/http/http_response.hpp b/http/http_response.hpp
index 5cbdb28..2af12c9 100644
--- a/http/http_response.hpp
+++ b/http/http_response.hpp
@@ -37,8 +37,7 @@
stringResponse->set(key, value);
}
- Response() : stringResponse(response_type{})
- {}
+ Response() : stringResponse(response_type{}) {}
Response(Response&& res) noexcept :
stringResponse(std::move(res.stringResponse)),
diff --git a/http/http_server.hpp b/http/http_server.hpp
index 3949a46..afa4514 100644
--- a/http/http_server.hpp
+++ b/http/http_server.hpp
@@ -67,8 +67,8 @@
gmtime_r(&lastTimeT, &myTm);
dateStr.resize(100);
- size_t dateStrSz =
- strftime(&dateStr[0], 99, "%a, %d %b %Y %H:%M:%S GMT", &myTm);
+ size_t dateStrSz = strftime(&dateStr[0], 99,
+ "%a, %d %b %Y %H:%M:%S GMT", &myTm);
dateStr.resize(dateStrSz);
}
diff --git a/http/logging.hpp b/http/logging.hpp
index 6543b73..ed0c7f7 100644
--- a/http/logging.hpp
+++ b/http/logging.hpp
@@ -65,8 +65,8 @@
gmtime_r(&t, &myTm);
- size_t sz =
- strftime(date.data(), date.size(), "%Y-%m-%d %H:%M:%S", &myTm);
+ size_t sz = strftime(date.data(), date.size(), "%Y-%m-%d %H:%M:%S",
+ &myTm);
date.resize(sz);
return date;
}
@@ -93,7 +93,7 @@
//
template <typename T>
- Logger& operator<<([[maybe_unused]] T const& value)
+ Logger& operator<<([[maybe_unused]] const T& value)
{
// Somewhere in the code we're implicitly casting an array to a
// pointer in logging code. It's non-trivial to find,
diff --git a/http/routing.hpp b/http/routing.hpp
index 18d3c2a..5bf6902 100644
--- a/http/routing.hpp
+++ b/http/routing.hpp
@@ -34,8 +34,7 @@
class BaseRule
{
public:
- explicit BaseRule(const std::string& thisRule) : rule(thisRule)
- {}
+ explicit BaseRule(const std::string& thisRule) : rule(thisRule) {}
virtual ~BaseRule() = default;
@@ -183,8 +182,7 @@
template <typename Req, typename... Args>
struct ReqHandlerWrapper
{
- explicit ReqHandlerWrapper(Func fIn) : f(std::move(fIn))
- {}
+ explicit ReqHandlerWrapper(Func fIn) : f(std::move(fIn)) {}
void operator()(const Request& req,
const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
@@ -284,11 +282,9 @@
using self_t = WebSocketRule;
public:
- explicit WebSocketRule(const std::string& ruleIn) : BaseRule(ruleIn)
- {}
+ explicit WebSocketRule(const std::string& ruleIn) : BaseRule(ruleIn) {}
- void validate() override
- {}
+ void validate() override {}
void handle(const Request& /*req*/,
const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
@@ -453,8 +449,7 @@
class DynamicRule : public BaseRule, public RuleParameterTraits<DynamicRule>
{
public:
- explicit DynamicRule(const std::string& ruleIn) : BaseRule(ruleIn)
- {}
+ explicit DynamicRule(const std::string& ruleIn) : BaseRule(ruleIn) {}
void validate() override
{
@@ -514,8 +509,7 @@
public:
using self_t = TaggedRule<Args...>;
- explicit TaggedRule(const std::string& ruleIn) : BaseRule(ruleIn)
- {}
+ explicit TaggedRule(const std::string& ruleIn) : BaseRule(ruleIn) {}
void validate() override
{
@@ -584,8 +578,7 @@
}
};
- Trie() : nodes(1)
- {}
+ Trie() : nodes(1) {}
private:
void optimizeNode(Node* node)
@@ -1015,8 +1008,8 @@
// Make sure it's safe to deference the array at that index
static_assert(maxVerbIndex <
std::tuple_size_v<decltype(perMethods)>);
- FindRoute route =
- findRouteByIndex(req.url().encoded_path(), perMethodIndex);
+ FindRoute route = findRouteByIndex(req.url().encoded_path(),
+ perMethodIndex);
if (route.rule == nullptr)
{
continue;
@@ -1246,8 +1239,8 @@
// route
if (foundRoute.allowHeader.empty())
{
- foundRoute.route =
- findRouteByIndex(req.url().encoded_path(), notFoundIndex);
+ foundRoute.route = findRouteByIndex(req.url().encoded_path(),
+ notFoundIndex);
}
else
{
@@ -1260,7 +1253,6 @@
// Fill in the allow header if it's valid
if (!foundRoute.allowHeader.empty())
{
-
asyncResp->res.addHeader(boost::beast::http::field::allow,
foundRoute.allowHeader);
}
@@ -1332,8 +1324,7 @@
Trie trie;
// rule index 0 has special meaning; preallocate it to avoid
// duplication.
- PerMethod() : rules(1)
- {}
+ PerMethod() : rules(1) {}
};
std::array<PerMethod, methodNotAllowedIndex + 1> perMethods;
diff --git a/http/utility.hpp b/http/utility.hpp
index 75c84c2..7a85519 100644
--- a/http/utility.hpp
+++ b/http/utility.hpp
@@ -123,8 +123,8 @@
{
return 0;
}
- std::string_view tag =
- url.substr(urlSegmentIndex, urlIndex + 1 - urlSegmentIndex);
+ std::string_view tag = url.substr(urlSegmentIndex,
+ urlIndex + 1 - urlSegmentIndex);
// Note, this is a really lame way to do std::pow(6, paramIndex)
// std::pow doesn't work in constexpr in clang.
diff --git a/http/websocket.hpp b/http/websocket.hpp
index 8774200..e61f58b 100644
--- a/http/websocket.hpp
+++ b/http/websocket.hpp
@@ -27,8 +27,7 @@
struct Connection : std::enable_shared_from_this<Connection>
{
public:
- explicit Connection(const crow::Request& reqIn) : req(reqIn.req)
- {}
+ explicit Connection(const crow::Request& reqIn) : req(reqIn.req) {}
Connection(const Connection&) = delete;
Connection(Connection&&) = delete;
diff --git a/include/async_resp.hpp b/include/async_resp.hpp
index d7f5819..eafaaca 100644
--- a/include/async_resp.hpp
+++ b/include/async_resp.hpp
@@ -16,8 +16,7 @@
{
public:
AsyncResp() = default;
- explicit AsyncResp(crow::Response&& resIn) : res(std::move(resIn))
- {}
+ explicit AsyncResp(crow::Response&& resIn) : res(std::move(resIn)) {}
AsyncResp(const AsyncResp&) = delete;
AsyncResp(AsyncResp&&) = delete;
diff --git a/include/authentication.hpp b/include/authentication.hpp
index 7110034..18e7822 100644
--- a/include/authentication.hpp
+++ b/include/authentication.hpp
@@ -146,8 +146,8 @@
{
endIndex = cookieValue.size();
}
- std::string_view authKey =
- cookieValue.substr(startIndex, endIndex - startIndex);
+ std::string_view authKey = cookieValue.substr(startIndex,
+ endIndex - startIndex);
std::shared_ptr<persistent_data::UserSession> sessionOut =
persistent_data::SessionStore::getInstance().loginSessionByToken(
diff --git a/include/dbus_utility.hpp b/include/dbus_utility.hpp
index b278882..ba3e5fa 100644
--- a/include/dbus_utility.hpp
+++ b/include/dbus_utility.hpp
@@ -125,7 +125,7 @@
std::filesystem::path p1(path);
int count = -1;
- for (auto const& element : p1)
+ for (const auto& element : p1)
{
if (element.has_filename())
{
diff --git a/include/hostname_monitor.hpp b/include/hostname_monitor.hpp
index ed719d5..fd49b02 100644
--- a/include/hostname_monitor.hpp
+++ b/include/hostname_monitor.hpp
@@ -75,9 +75,9 @@
const int maxKeySize = 256;
std::array<char, maxKeySize> cnBuffer{};
- int cnLength =
- X509_NAME_get_text_by_NID(X509_get_subject_name(cert), NID_commonName,
- cnBuffer.data(), cnBuffer.size());
+ int cnLength = X509_NAME_get_text_by_NID(X509_get_subject_name(cert),
+ NID_commonName, cnBuffer.data(),
+ cnBuffer.size());
if (cnLength == -1)
{
BMCWEB_LOG_ERROR << "Failed to read NID_commonName";
diff --git a/include/human_sort.hpp b/include/human_sort.hpp
index 7ab326d..5cb6e56 100644
--- a/include/human_sort.hpp
+++ b/include/human_sort.hpp
@@ -24,7 +24,6 @@
inline int alphanumComp(std::string_view left, std::string_view right)
{
-
std::string_view::const_iterator l = left.begin();
std::string_view::const_iterator r = right.begin();
diff --git a/include/ibm/locks.hpp b/include/ibm/locks.hpp
index fd27ef9..99b9cc3 100644
--- a/include/ibm/locks.hpp
+++ b/include/ibm/locks.hpp
@@ -187,7 +187,6 @@
inline RcGetLockList Lock::getLockList(const ListOfSessionIds& listSessionId)
{
-
std::vector<std::pair<uint32_t, LockRequests>> lockList;
if (!lockTable.empty())
@@ -241,7 +240,6 @@
inline RcAcquireLock Lock::acquireLock(const LockRequests& lockRequestStructure)
{
-
// validate the lock request
for (const auto& lockRecord : lockRequestStructure)
@@ -363,7 +361,6 @@
inline bool Lock::isValidLockRequest(const LockRequest& refLockRecord)
{
-
// validate the locktype
if (!((boost::equals(std::get<2>(refLockRecord), "Read") ||
@@ -392,7 +389,6 @@
for (const auto& p : std::get<4>(refLockRecord))
{
-
// validate the lock flags
// Allowed lockflags are locksame,lockall & dontlock
@@ -552,7 +548,6 @@
uint32_t i = 0;
for (const auto& p : std::get<4>(refLockRecord1))
{
-
// return conflict when any of them is try to lock all resources
// under the current resource level.
if (boost::equals(p.first, "LockAll") ||
diff --git a/include/ibm/management_console_rest.hpp b/include/ibm/management_console_rest.hpp
index e1b7f83..51f5298 100644
--- a/include/ibm/management_console_rest.hpp
+++ b/include/ibm/management_console_rest.hpp
@@ -36,11 +36,11 @@
constexpr size_t maxSaveareaDirSize =
25000000; // Allow save area dir size to be max 25MB
constexpr size_t minSaveareaFileSize =
- 100; // Allow save area file size of minimum 100B
+ 100; // Allow save area file size of minimum 100B
constexpr size_t maxSaveareaFileSize =
- 500000; // Allow save area file size upto 500KB
+ 500000; // Allow save area file size upto 500KB
constexpr size_t maxBroadcastMsgSize =
- 1000; // Allow Broadcast message size upto 1KB
+ 1000; // Allow Broadcast message size upto 1KB
inline void handleFilePut(const crow::Request& req,
const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
@@ -323,8 +323,8 @@
return;
}
- std::string contentDispositionParam =
- "attachment; filename=\"" + fileID + "\"";
+ std::string contentDispositionParam = "attachment; filename=\"" + fileID +
+ "\"";
asyncResp->res.addHeader(boost::beast::http::field::content_disposition,
contentDispositionParam);
std::string fileData;
@@ -685,7 +685,6 @@
inline void requestRoutes(App& app)
{
-
// allowed only for admin
BMCWEB_ROUTE(app, "/ibm/v1/")
.privileges({{"ConfigureComponents", "ConfigureManager"}})
diff --git a/include/login_routes.hpp b/include/login_routes.hpp
index 00debb5..122e741 100644
--- a/include/login_routes.hpp
+++ b/include/login_routes.hpp
@@ -37,8 +37,8 @@
// Check if auth was provided by a payload
if (contentType.starts_with("application/json"))
{
- loginCredentials =
- nlohmann::json::parse(req.body(), nullptr, false);
+ loginCredentials = nlohmann::json::parse(req.body(), nullptr,
+ false);
if (loginCredentials.is_discarded())
{
BMCWEB_LOG_DEBUG << "Bad json in request";
@@ -77,8 +77,8 @@
if (dataIt->size() == 2)
{
nlohmann::json::iterator userIt2 = dataIt->begin();
- nlohmann::json::iterator passIt2 =
- dataIt->begin() + 1;
+ nlohmann::json::iterator passIt2 = dataIt->begin() +
+ 1;
looksLikePhosphorRest = true;
if (userIt2 != dataIt->end() &&
passIt2 != dataIt->end())
@@ -235,8 +235,8 @@
const auto& session = req.session;
if (session != nullptr)
{
- asyncResp->res.jsonValue["data"] =
- "User '" + session->username + "' logged out";
+ asyncResp->res.jsonValue["data"] = "User '" + session->username +
+ "' logged out";
asyncResp->res.jsonValue["message"] = "200 OK";
asyncResp->res.jsonValue["status"] = "ok";
diff --git a/include/multipart_parser.hpp b/include/multipart_parser.hpp
index adeeccb..abc1657 100644
--- a/include/multipart_parser.hpp
+++ b/include/multipart_parser.hpp
@@ -274,8 +274,8 @@
// NOLINTNEXTLINE(cppcoreguidelines-pro-bounds-pointer-arithmetic)
const char* start = buffer + partDataMark;
size_t size = i - partDataMark;
- mime_fields.rbegin()->content +=
- std::string_view(start, size);
+ mime_fields.rbegin()->content += std::string_view(start,
+ size);
}
index++;
}
diff --git a/include/openbmc_dbus_rest.hpp b/include/openbmc_dbus_rest.hpp
index 5bdc4ec..82e3ecd 100644
--- a/include/openbmc_dbus_rest.hpp
+++ b/include/openbmc_dbus_rest.hpp
@@ -221,7 +221,6 @@
}
else
{
-
propertyJson = val;
}
},
@@ -344,7 +343,6 @@
}
else
{
-
propertyJson = val;
}
},
@@ -1678,8 +1676,8 @@
[objectPath, asyncResp](
const boost::system::error_code& ec,
const dbus::utility::MapperGetSubTreeResponse& objectNames) {
- auto transaction =
- std::make_shared<InProgressEnumerateData>(objectPath, asyncResp);
+ auto transaction = std::make_shared<InProgressEnumerateData>(objectPath,
+ asyncResp);
transaction->subtree =
std::make_shared<dbus::utility::MapperGetSubTreeResponse>(
@@ -2030,7 +2028,6 @@
const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
std::string& objectPath)
{
-
// If accessing a single attribute, fill in and update objectPath,
// otherwise leave destProperty blank
std::string destProperty;
@@ -2572,8 +2569,8 @@
asyncResp->res.result(boost::beast::http::status::not_found);
return;
}
- std::string contentDispositionParam =
- "attachment; filename=\"" + dumpFileName + "\"";
+ std::string contentDispositionParam = "attachment; filename=\"" +
+ dumpFileName + "\"";
asyncResp->res.addHeader(
boost::beast::http::field::content_disposition,
diff --git a/include/sessions.hpp b/include/sessions.hpp
index 99a1a0e..6bb6a7a 100644
--- a/include/sessions.hpp
+++ b/include/sessions.hpp
@@ -417,8 +417,7 @@
AuthConfigMethods authMethodsConfig;
private:
- SessionStore() : timeoutInSeconds(1800)
- {}
+ SessionStore() : timeoutInSeconds(1800) {}
};
} // namespace persistent_data
diff --git a/include/ssl_key_handler.hpp b/include/ssl_key_handler.hpp
index 73d0b83..7152841 100644
--- a/include/ssl_key_handler.hpp
+++ b/include/ssl_key_handler.hpp
@@ -21,8 +21,8 @@
namespace ensuressl
{
-constexpr char const* trustStorePath = "/etc/ssl/certs/authority";
-constexpr char const* x509Comment = "Generated from OpenBMC service";
+constexpr const char* trustStorePath = "/etc/ssl/certs/authority";
+constexpr const char* x509Comment = "Generated from OpenBMC service";
static void initOpenssl();
static EVP_PKEY* createEcKey();
@@ -144,8 +144,8 @@
}
}
#else
- EVP_PKEY_CTX* pkeyCtx =
- EVP_PKEY_CTX_new_from_pkey(nullptr, pkey, nullptr);
+ EVP_PKEY_CTX* pkeyCtx = EVP_PKEY_CTX_new_from_pkey(nullptr, pkey,
+ nullptr);
if (pkeyCtx == nullptr)
{
@@ -158,7 +158,6 @@
}
else
{
-
std::cerr << "Key not valid error number " << ERR_get_error()
<< "\n";
}
diff --git a/redfish-core/include/event_service_manager.hpp b/redfish-core/include/event_service_manager.hpp
index 0b87555..3fc4133 100644
--- a/redfish-core/include/event_service_manager.hpp
+++ b/redfish-core/include/event_service_manager.hpp
@@ -245,8 +245,8 @@
return -1;
}
- std::string msg =
- redfish::registries::fillMessageArgs(messageArgs, message->message);
+ std::string msg = redfish::registries::fillMessageArgs(messageArgs,
+ message->message);
if (msg.empty())
{
return -1;
@@ -440,8 +440,8 @@
msg["Name"] = "Event Log";
msg["Events"] = logEntryArray;
- std::string strMsg =
- msg.dump(2, ' ', true, nlohmann::json::error_handler_t::replace);
+ std::string strMsg = msg.dump(2, ' ', true,
+ nlohmann::json::error_handler_t::replace);
return this->sendEvent(strMsg);
}
@@ -509,8 +509,8 @@
msg["Name"] = "Event Log";
msg["Events"] = logEntryArray;
- std::string strMsg =
- msg.dump(2, ' ', true, nlohmann::json::error_handler_t::replace);
+ std::string strMsg = msg.dump(2, ' ', true,
+ nlohmann::json::error_handler_t::replace);
this->sendEvent(strMsg);
}
#endif
@@ -549,8 +549,8 @@
msg["Context"] = customText;
}
- std::string strMsg =
- msg.dump(2, ' ', true, nlohmann::json::error_handler_t::replace);
+ std::string strMsg = msg.dump(2, ' ', true,
+ nlohmann::json::error_handler_t::replace);
this->sendEvent(strMsg);
}
@@ -883,7 +883,6 @@
std::string addSubscription(const std::shared_ptr<Subscription>& subValue,
const bool updateFile = true)
{
-
std::uniform_int_distribution<uint32_t> dist(0);
bmcweb::OpenSSLGenerator gen;
@@ -1317,8 +1316,8 @@
}
// Watch redfish event log file for modifications.
- fileWatchDesc =
- inotify_add_watch(inotifyFd, redfishEventLogFile, IN_MODIFY);
+ fileWatchDesc = inotify_add_watch(inotifyFd, redfishEventLogFile,
+ IN_MODIFY);
if (fileWatchDesc == -1)
{
BMCWEB_LOG_ERROR
diff --git a/redfish-core/include/gzfile.hpp b/redfish-core/include/gzfile.hpp
index 844932a..34bc151 100644
--- a/redfish-core/include/gzfile.hpp
+++ b/redfish-core/include/gzfile.hpp
@@ -97,8 +97,8 @@
while (pos != std::string::npos)
{
- std::string logEntry =
- bufferStr.substr(initialPos, pos - initialPos);
+ std::string logEntry = bufferStr.substr(initialPos,
+ pos - initialPos);
// Since there might be consecutive delimiters like "\r\n", we need
// to filter empty strings.
if (!logEntry.empty())
diff --git a/redfish-core/include/redfish_aggregator.hpp b/redfish-core/include/redfish_aggregator.hpp
index 9168cc5..896eb4a 100644
--- a/redfish-core/include/redfish_aggregator.hpp
+++ b/redfish-core/include/redfish_aggregator.hpp
@@ -815,8 +815,8 @@
if (boost::iequals(contentType, "application/json") ||
boost::iequals(contentType, "application/json; charset=utf-8"))
{
- nlohmann::json jsonVal =
- nlohmann::json::parse(resp.body(), nullptr, false);
+ nlohmann::json jsonVal = nlohmann::json::parse(resp.body(), nullptr,
+ false);
if (jsonVal.is_discarded())
{
BMCWEB_LOG_ERROR << "Error parsing satellite response as JSON";
@@ -879,8 +879,8 @@
if (boost::iequals(contentType, "application/json") ||
boost::iequals(contentType, "application/json; charset=utf-8"))
{
- nlohmann::json jsonVal =
- nlohmann::json::parse(resp.body(), nullptr, false);
+ nlohmann::json jsonVal = nlohmann::json::parse(resp.body(), nullptr,
+ false);
if (jsonVal.is_discarded())
{
BMCWEB_LOG_ERROR << "Error parsing satellite response as JSON";
@@ -1013,8 +1013,8 @@
boost::iequals(contentType, "application/json; charset=utf-8"))
{
bool addedLinks = false;
- nlohmann::json jsonVal =
- nlohmann::json::parse(resp.body(), nullptr, false);
+ nlohmann::json jsonVal = nlohmann::json::parse(resp.body(), nullptr,
+ false);
if (jsonVal.is_discarded())
{
BMCWEB_LOG_ERROR << "Error parsing satellite response as JSON";
diff --git a/redfish-core/include/utils/json_utils.hpp b/redfish-core/include/utils/json_utils.hpp
index 26b9a8a..774ab7c 100644
--- a/redfish-core/include/utils/json_utils.hpp
+++ b/redfish-core/include/utils/json_utils.hpp
@@ -505,8 +505,7 @@
return result;
}
-inline void packVariant(std::span<PerUnpack> /*toPack*/)
-{}
+inline void packVariant(std::span<PerUnpack> /*toPack*/) {}
template <typename FirstType, typename... UnpackTypes>
void packVariant(std::span<PerUnpack> toPack, std::string_view key,
diff --git a/redfish-core/include/utils/query_param.hpp b/redfish-core/include/utils/query_param.hpp
index 96885eb..e6ca9d3 100644
--- a/redfish-core/include/utils/query_param.hpp
+++ b/redfish-core/include/utils/query_param.hpp
@@ -916,9 +916,9 @@
constexpr std::array<std::string_view, 5> reservedProperties = {
"@odata.id", "@odata.type", "@odata.context", "@odata.etag",
"error"};
- bool reserved =
- std::find(reservedProperties.begin(), reservedProperties.end(),
- it.key()) != reservedProperties.end();
+ bool reserved = std::find(reservedProperties.begin(),
+ reservedProperties.end(),
+ it.key()) != reservedProperties.end();
if (reserved || (nextNode != nullptr && nextNode->isSelected()))
{
it = nextIt;
diff --git a/redfish-core/include/utils/sw_utils.hpp b/redfish-core/include/utils/sw_utils.hpp
index 90048dd..7c746a0 100644
--- a/redfish-core/include/utils/sw_utils.hpp
+++ b/redfish-core/include/utils/sw_utils.hpp
@@ -110,7 +110,6 @@
std::string, std::vector<std::string>>>>&
obj : subtree)
{
-
sdbusplus::message::object_path path(obj.first);
std::string swId = path.filename();
if (swId.empty())
diff --git a/redfish-core/include/utils/time_utils.hpp b/redfish-core/include/utils/time_utils.hpp
index f4fb0c0..cb018ef 100644
--- a/redfish-core/include/utils/time_utils.hpp
+++ b/redfish-core/include/utils/time_utils.hpp
@@ -261,8 +261,8 @@
z += 719468;
IntType era = (z >= 0 ? z : z - 146096) / 146097;
unsigned doe = static_cast<unsigned>(z - era * 146097); // [0, 146096]
- unsigned yoe =
- (doe - doe / 1460 + doe / 36524 - doe / 146096) / 365; // [0, 399]
+ unsigned yoe = (doe - doe / 1460 + doe / 36524 - doe / 146096) /
+ 365; // [0, 399]
IntType y = static_cast<IntType>(yoe) + era * 400;
unsigned doy = doe - (365 * yoe + yoe / 4 - yoe / 100); // [0, 365]
unsigned mp = (5 * doy + 2) / 153; // [0, 11]
diff --git a/redfish-core/lib/account_service.hpp b/redfish-core/lib/account_service.hpp
index a844b61..c9d4eb8 100644
--- a/redfish-core/lib/account_service.hpp
+++ b/redfish-core/lib/account_service.hpp
@@ -204,8 +204,8 @@
const LDAPConfigData& confData,
const std::string& ldapType)
{
- std::string service =
- (ldapType == "LDAP") ? "LDAPService" : "ActiveDirectoryService";
+ std::string service = (ldapType == "LDAP") ? "LDAPService"
+ : "ActiveDirectoryService";
nlohmann::json& ldap = jsonResponse[ldapType];
@@ -265,9 +265,8 @@
messages::internalError(asyncResp->res);
return;
}
- asyncResp->res
- .jsonValue[serverType]["RemoteRoleMapping"][index] =
- nullptr;
+ asyncResp->res.jsonValue[serverType]["RemoteRoleMapping"]
+ [index] = nullptr;
},
ldapDbusService, roleMapObjData[index].first,
"xyz.openbmc_project.Object.Delete", "Delete");
@@ -361,8 +360,8 @@
{
BMCWEB_LOG_DEBUG
<< "setRoleMappingProperties: Creating new Object";
- std::string pathString =
- "RemoteRoleMapping/" + std::to_string(index);
+ std::string pathString = "RemoteRoleMapping/" +
+ std::to_string(index);
if (!localRole)
{
@@ -423,7 +422,6 @@
inline void getLDAPConfigData(const std::string& ldapType,
CallbackFunc&& callback)
{
-
constexpr std::array<std::string_view, 2> interfaces = {
ldapEnableInterface, ldapConfigInterface};
@@ -509,7 +507,6 @@
}
else if (interface.first == ldapConfigInterfaceStr)
{
-
for (const auto& property : interface.second)
{
const std::string* strValue =
@@ -712,9 +709,8 @@
messages::internalError(asyncResp->res);
return;
}
- asyncResp->res
- .jsonValue[ldapServerElementName]["Authentication"]["Username"] =
- username;
+ asyncResp->res.jsonValue[ldapServerElementName]["Authentication"]
+ ["Username"] = username;
BMCWEB_LOG_DEBUG << "Updated the username";
},
ldapDbusService, ldapConfigObject, propertyInterface, "Set",
@@ -745,9 +741,8 @@
messages::internalError(asyncResp->res);
return;
}
- asyncResp->res
- .jsonValue[ldapServerElementName]["Authentication"]["Password"] =
- "";
+ asyncResp->res.jsonValue[ldapServerElementName]["Authentication"]
+ ["Password"] = "";
BMCWEB_LOG_DEBUG << "Updated the password";
},
ldapDbusService, ldapConfigObject, propertyInterface, "Set",
@@ -1588,8 +1583,8 @@
if (userCanSeeAllAccounts || (thisUser == user && userCanSeeSelf))
{
nlohmann::json::object_t member;
- member["@odata.id"] =
- "/redfish/v1/AccountService/Accounts/" + user;
+ member["@odata.id"] = "/redfish/v1/AccountService/Accounts/" +
+ user;
memberArray.push_back(std::move(member));
}
}
@@ -2016,7 +2011,6 @@
inline void requestAccountServiceRoutes(App& app)
{
-
BMCWEB_ROUTE(app, "/redfish/v1/AccountService/")
.privileges(redfish::privileges::headAccountService)
.methods(boost::beast::http::verb::head)(
diff --git a/redfish-core/lib/certificate_service.hpp b/redfish-core/lib/certificate_service.hpp
index cdeb210..3cb6a3f 100644
--- a/redfish-core/lib/certificate_service.hpp
+++ b/redfish-core/lib/certificate_service.hpp
@@ -24,23 +24,23 @@
{
namespace certs
{
-constexpr char const* certInstallIntf = "xyz.openbmc_project.Certs.Install";
-constexpr char const* certReplaceIntf = "xyz.openbmc_project.Certs.Replace";
-constexpr char const* objDeleteIntf = "xyz.openbmc_project.Object.Delete";
-constexpr char const* certPropIntf = "xyz.openbmc_project.Certs.Certificate";
-constexpr char const* dbusPropIntf = "org.freedesktop.DBus.Properties";
-constexpr char const* dbusObjManagerIntf = "org.freedesktop.DBus.ObjectManager";
-constexpr char const* httpsServiceName =
+constexpr const char* certInstallIntf = "xyz.openbmc_project.Certs.Install";
+constexpr const char* certReplaceIntf = "xyz.openbmc_project.Certs.Replace";
+constexpr const char* objDeleteIntf = "xyz.openbmc_project.Object.Delete";
+constexpr const char* certPropIntf = "xyz.openbmc_project.Certs.Certificate";
+constexpr const char* dbusPropIntf = "org.freedesktop.DBus.Properties";
+constexpr const char* dbusObjManagerIntf = "org.freedesktop.DBus.ObjectManager";
+constexpr const char* httpsServiceName =
"xyz.openbmc_project.Certs.Manager.Server.Https";
-constexpr char const* ldapServiceName =
+constexpr const char* ldapServiceName =
"xyz.openbmc_project.Certs.Manager.Client.Ldap";
-constexpr char const* authorityServiceName =
+constexpr const char* authorityServiceName =
"xyz.openbmc_project.Certs.Manager.Authority.Ldap";
-constexpr char const* baseObjectPath = "/xyz/openbmc_project/certs";
-constexpr char const* httpsObjectPath =
+constexpr const char* baseObjectPath = "/xyz/openbmc_project/certs";
+constexpr const char* httpsObjectPath =
"/xyz/openbmc_project/certs/server/https";
-constexpr char const* ldapObjectPath = "/xyz/openbmc_project/certs/client/ldap";
-constexpr char const* authorityObjectPath =
+constexpr const char* ldapObjectPath = "/xyz/openbmc_project/certs/client/ldap";
+constexpr const char* authorityObjectPath =
"/xyz/openbmc_project/certs/authority/ldap";
} // namespace certs
@@ -517,8 +517,8 @@
"bmc", "NetworkProtocol", "HTTPS",
"Certificates", std::ref(id)))
{
- objectPath =
- sdbusplus::message::object_path(certs::httpsObjectPath) / id;
+ objectPath = sdbusplus::message::object_path(certs::httpsObjectPath) /
+ id;
name = "HTTPS certificate";
service = certs::httpsServiceName;
}
@@ -526,8 +526,8 @@
"AccountService", "LDAP",
"Certificates", std::ref(id)))
{
- objectPath =
- sdbusplus::message::object_path(certs::ldapObjectPath) / id;
+ objectPath = sdbusplus::message::object_path(certs::ldapObjectPath) /
+ id;
name = "LDAP certificate";
service = certs::ldapServiceName;
}
diff --git a/redfish-core/lib/ethernet.hpp b/redfish-core/lib/ethernet.hpp
index 9563290..e4e7b5a 100644
--- a/redfish-core/lib/ethernet.hpp
+++ b/redfish-core/lib/ethernet.hpp
@@ -429,8 +429,8 @@
const dbus::utility::ManagedObjectType& dbusData,
boost::container::flat_set<IPv6AddressData>& ipv6Config)
{
- const std::string ipPathStart =
- "/xyz/openbmc_project/network/" + ethifaceId;
+ const std::string ipPathStart = "/xyz/openbmc_project/network/" +
+ ethifaceId;
// Since there might be several IPv6 configurations aligned with
// single ethernet interface, loop over all of them
@@ -527,8 +527,8 @@
const dbus::utility::ManagedObjectType& dbusData,
boost::container::flat_set<IPv4AddressData>& ipv4Config)
{
- const std::string ipPathStart =
- "/xyz/openbmc_project/network/" + ethifaceId;
+ const std::string ipPathStart = "/xyz/openbmc_project/network/" +
+ ethifaceId;
// Since there might be several IPv4 configurations aligned with
// single ethernet interface, loop over all of them
@@ -917,8 +917,8 @@
handleMTUSizePatch(const std::string& ifaceId, const size_t mtuSize,
const std::shared_ptr<bmcweb::AsyncResp>& asyncResp)
{
- sdbusplus::message::object_path objPath =
- "/xyz/openbmc_project/network/" + ifaceId;
+ sdbusplus::message::object_path objPath = "/xyz/openbmc_project/network/" +
+ ifaceId;
crow::connections::systemBus->async_method_call(
[asyncResp](const boost::system::error_code& ec) {
if (ec)
@@ -1263,8 +1263,8 @@
for (nlohmann::json& thisJson : input)
{
- std::string pathString =
- "IPv4StaticAddresses/" + std::to_string(entryIdx);
+ std::string pathString = "IPv4StaticAddresses/" +
+ std::to_string(entryIdx);
if (!thisJson.is_null() && !thisJson.empty())
{
@@ -1379,8 +1379,8 @@
deleteAndCreateIPAddress(IpVersion::IpV4, ifaceId,
nicIpEntry->id, prefixLength, *gw,
*addr, asyncResp);
- nicIpEntry =
- getNextStaticIpEntry(++nicIpEntry, ipv4Data.cend());
+ nicIpEntry = getNextStaticIpEntry(++nicIpEntry,
+ ipv4Data.cend());
}
else
{
@@ -1415,8 +1415,8 @@
}
if (nicIpEntry != ipv4Data.cend())
{
- nicIpEntry =
- getNextStaticIpEntry(++nicIpEntry, ipv4Data.cend());
+ nicIpEntry = getNextStaticIpEntry(++nicIpEntry,
+ ipv4Data.cend());
}
entryIdx++;
}
@@ -1461,8 +1461,8 @@
getNextStaticIpEntry(ipv6Data.cbegin(), ipv6Data.cend());
for (const nlohmann::json& thisJson : input)
{
- std::string pathString =
- "IPv6StaticAddresses/" + std::to_string(entryIdx);
+ std::string pathString = "IPv6StaticAddresses/" +
+ std::to_string(entryIdx);
if (!thisJson.is_null() && !thisJson.empty())
{
@@ -1522,8 +1522,8 @@
deleteAndCreateIPAddress(IpVersion::IpV6, ifaceId,
nicIpEntry->id, prefix, "", *addr,
asyncResp);
- nicIpEntry =
- getNextStaticIpEntry(++nicIpEntry, ipv6Data.cend());
+ nicIpEntry = getNextStaticIpEntry(++nicIpEntry,
+ ipv6Data.cend());
}
else
{
@@ -1557,8 +1557,8 @@
}
if (nicIpEntry != ipv6Data.cend())
{
- nicIpEntry =
- getNextStaticIpEntry(++nicIpEntry, ipv6Data.cend());
+ nicIpEntry = getNextStaticIpEntry(++nicIpEntry,
+ ipv6Data.cend());
}
entryIdx++;
}
diff --git a/redfish-core/lib/event_service.hpp b/redfish-core/lib/event_service.hpp
index c418504..82004e0 100644
--- a/redfish-core/lib/event_service.hpp
+++ b/redfish-core/lib/event_service.hpp
@@ -162,7 +162,6 @@
inline void requestRoutesSubmitTestEvent(App& app)
{
-
BMCWEB_ROUTE(
app, "/redfish/v1/EventService/Actions/EventService.SubmitTestEvent/")
.privileges(redfish::privileges::postEventService)
@@ -210,8 +209,8 @@
for (const std::string& id : subscripIds)
{
nlohmann::json::object_t member;
- member["@odata.id"] =
- "/redfish/v1/EventService/Subscriptions/" + id;
+ member["@odata.id"] = "/redfish/v1/EventService/Subscriptions/" +
+ id;
memberArray.push_back(std::move(member));
}
});
diff --git a/redfish-core/lib/fabric_adapters.hpp b/redfish-core/lib/fabric_adapters.hpp
index 1799159..be89fbc 100644
--- a/redfish-core/lib/fabric_adapters.hpp
+++ b/redfish-core/lib/fabric_adapters.hpp
@@ -25,7 +25,6 @@
crow::Response& res,
const std::string& adapterId)
{
-
if (ec.value() == boost::system::errc::io_error)
{
messages::resourceNotFound(res, "#FabricAdapter.v1_4_0.FabricAdapter",
diff --git a/redfish-core/lib/health.hpp b/redfish-core/lib/health.hpp
index 643ce7f..ef858a1 100644
--- a/redfish-core/lib/health.hpp
+++ b/redfish-core/lib/health.hpp
@@ -82,7 +82,6 @@
// managers inventory is all the inventory, don't skip any
if (!isManagersHealth && !isSelf)
{
-
// We only want to look at this association if either the path
// of this association is an inventory item, or one of the
// endpoints in this association is a child
diff --git a/redfish-core/lib/hypervisor_system.hpp b/redfish-core/lib/hypervisor_system.hpp
index 1c27223..e524145 100644
--- a/redfish-core/lib/hypervisor_system.hpp
+++ b/redfish-core/lib/hypervisor_system.hpp
@@ -327,8 +327,8 @@
return;
}
- bool found =
- extractHypervisorInterfaceData(ethIfaceId, resp, ethData, ipv4Data);
+ bool found = extractHypervisorInterfaceData(ethIfaceId, resp, ethData,
+ ipv4Data);
if (!found)
{
BMCWEB_LOG_INFO << "Hypervisor Interface not found";
diff --git a/redfish-core/lib/log_services.hpp b/redfish-core/lib/log_services.hpp
index 5159ae1..aeb1d19 100644
--- a/redfish-core/lib/log_services.hpp
+++ b/redfish-core/lib/log_services.hpp
@@ -56,14 +56,14 @@
namespace redfish
{
-constexpr char const* crashdumpObject = "com.intel.crashdump";
-constexpr char const* crashdumpPath = "/com/intel/crashdump";
-constexpr char const* crashdumpInterface = "com.intel.crashdump";
-constexpr char const* deleteAllInterface =
+constexpr const char* crashdumpObject = "com.intel.crashdump";
+constexpr const char* crashdumpPath = "/com/intel/crashdump";
+constexpr const char* crashdumpInterface = "com.intel.crashdump";
+constexpr const char* deleteAllInterface =
"xyz.openbmc_project.Collection.DeleteAll";
-constexpr char const* crashdumpOnDemandInterface =
+constexpr const char* crashdumpOnDemandInterface =
"com.intel.crashdump.OnDemand";
-constexpr char const* crashdumpTelemetryInterface =
+constexpr const char* crashdumpTelemetryInterface =
"com.intel.crashdump.Telemetry";
enum class DumpCreationProgress
@@ -274,8 +274,8 @@
}
}
// Timestamp has no index
- auto [ptr, ec] =
- std::from_chars(tsStr.data(), tsStr.data() + tsStr.size(), timestamp);
+ auto [ptr, ec] = std::from_chars(tsStr.data(), tsStr.data() + tsStr.size(),
+ timestamp);
if (ec != std::errc())
{
messages::resourceNotFound(asyncResp->res, "LogEntry", entryID);
@@ -489,8 +489,8 @@
"#LogEntryCollection.LogEntryCollection";
asyncResp->res.jsonValue["@odata.id"] = std::move(odataIdStr);
asyncResp->res.jsonValue["Name"] = dumpType + " Dump Entries";
- asyncResp->res.jsonValue["Description"] =
- "Collection of " + dumpType + " Dump Entries";
+ asyncResp->res.jsonValue["Description"] = "Collection of " + dumpType +
+ " Dump Entries";
nlohmann::json& entriesArray = asyncResp->res.jsonValue["Members"];
entriesArray = nlohmann::json::array();
@@ -552,16 +552,16 @@
if (dumpType == "BMC")
{
thisEntry["DiagnosticDataType"] = "Manager";
- thisEntry["AdditionalDataURI"] =
- entriesPath + entryID + "/attachment";
+ thisEntry["AdditionalDataURI"] = entriesPath + entryID +
+ "/attachment";
thisEntry["AdditionalDataSizeBytes"] = size;
}
else if (dumpType == "System")
{
thisEntry["DiagnosticDataType"] = "OEM";
thisEntry["OEMDiagnosticDataType"] = "System";
- thisEntry["AdditionalDataURI"] =
- entriesPath + entryID + "/attachment";
+ thisEntry["AdditionalDataURI"] = entriesPath + entryID +
+ "/attachment";
thisEntry["AdditionalDataSizeBytes"] = size;
}
entriesArray.push_back(std::move(thisEntry));
@@ -854,8 +854,8 @@
nlohmann::json retMessage = messages::success();
taskData->messages.emplace_back(retMessage);
- std::string headerLoc =
- "Location: " + dumpEntryPath + http_helpers::urlEncode(dumpId);
+ std::string headerLoc = "Location: " + dumpEntryPath +
+ http_helpers::urlEncode(dumpId);
taskData->payload->httpHeaders.emplace_back(std::move(headerLoc));
BMCWEB_LOG_DEBUG << createdObjPath.str
@@ -1424,8 +1424,8 @@
firstEntry = false;
nlohmann::json::object_t bmcLogEntry;
- LogParseError status =
- fillEventLogEntryJson(idStr, logEntry, bmcLogEntry);
+ LogParseError status = fillEventLogEntryJson(idStr, logEntry,
+ bmcLogEntry);
if (status == LogParseError::messageIdNotInRegistry)
{
continue;
@@ -3898,9 +3898,9 @@
endCount = entryCount + postcode.size();
if (skip < endCount && (top + skip) > entryCount)
{
- uint64_t thisBootSkip =
- std::max(static_cast<uint64_t>(skip), entryCount) -
- entryCount;
+ uint64_t thisBootSkip = std::max(static_cast<uint64_t>(skip),
+ entryCount) -
+ entryCount;
uint64_t thisBootTop =
std::min(static_cast<uint64_t>(top + skip), endCount) -
entryCount;
diff --git a/redfish-core/lib/managers.hpp b/redfish-core/lib/managers.hpp
index 6e1427b..134ecb6 100644
--- a/redfish-core/lib/managers.hpp
+++ b/redfish-core/lib/managers.hpp
@@ -163,7 +163,6 @@
*/
inline void requestRoutesManagerResetToDefaultsAction(App& app)
{
-
/**
* Function handles ResetToDefaults POST method request.
*
@@ -288,7 +287,6 @@
const std::vector<std::string>& supportedProfiles,
const std::shared_ptr<bmcweb::AsyncResp>& asyncResp)
{
-
crow::connections::systemBus->async_method_call(
[asyncResp, currentProfile, supportedProfiles](
const boost::system::error_code& ec,
@@ -440,7 +438,6 @@
// pid and fans are off the same configuration
else if (intfPair.first == pidConfigurationIface)
{
-
if (classPtr == nullptr)
{
BMCWEB_LOG_ERROR << "Pid Class Field illegal";
@@ -569,7 +566,6 @@
if (intfPair.first == pidConfigurationIface ||
intfPair.first == stepwiseConfigurationIface)
{
-
if (propertyPair.first == "Zones")
{
const std::vector<std::string>* inputs =
@@ -782,7 +778,6 @@
dbus::utility::DBusPropertiesMap& output, std::string& chassis,
const std::string& profile)
{
-
// common deleter
if (it.value() == nullptr)
{
@@ -1027,7 +1022,6 @@
if (chassisContainer)
{
-
std::string chassisId;
if (!redfish::json_util::readJson(*chassisContainer, response->res,
"@odata.id", chassisId))
@@ -1116,7 +1110,6 @@
{
for (std::string& value : *inputs)
{
-
std::replace(value.begin(), value.end(), '_', ' ');
}
output.emplace_back("Inputs", std::move(*inputs));
@@ -1328,12 +1321,10 @@
struct SetPIDValues : std::enable_shared_from_this<SetPIDValues>
{
-
SetPIDValues(const std::shared_ptr<bmcweb::AsyncResp>& asyncRespIn,
nlohmann::json& data) :
asyncResp(asyncRespIn)
{
-
std::optional<nlohmann::json> pidControllers;
std::optional<nlohmann::json> fanControllers;
std::optional<nlohmann::json> fanZones;
@@ -1508,12 +1499,12 @@
std::replace(dbusObjName.begin(), dbusObjName.end(), ' ', '_');
BMCWEB_LOG_DEBUG << "looking for " << name;
- auto pathItr =
- std::find_if(managedObj.begin(), managedObj.end(),
- [&dbusObjName](const auto& obj) {
+ auto pathItr = std::find_if(managedObj.begin(),
+ managedObj.end(),
+ [&dbusObjName](const auto& obj) {
return boost::algorithm::ends_with(obj.first.str,
"/" + dbusObjName);
- });
+ });
dbus::utility::DBusPropertiesMap output;
output.reserve(16); // The pid interface length
@@ -2107,7 +2098,6 @@
if (interfaceName ==
"xyz.openbmc_project.Inventory.Decorator.Asset")
{
-
sdbusplus::asio::getAllProperties(
*crow::connections::systemBus, connectionName, path,
"xyz.openbmc_project.Inventory.Decorator.Asset",
diff --git a/redfish-core/lib/memory.hpp b/redfish-core/lib/memory.hpp
index 4478472..c57d387 100644
--- a/redfish-core/lib/memory.hpp
+++ b/redfish-core/lib/memory.hpp
@@ -243,15 +243,14 @@
if (volatileSizeInKiB != nullptr)
{
-
aResp->res.jsonValue[jsonPtr]["VolatileSizeMiB"] =
(*volatileSizeInKiB) >> 10;
}
if (pmSizeInKiB != nullptr)
{
- aResp->res.jsonValue[jsonPtr]["NonVolatileSizeMiB"] =
- (*pmSizeInKiB) >> 10;
+ aResp->res.jsonValue[jsonPtr]["NonVolatileSizeMiB"] = (*pmSizeInKiB) >>
+ 10;
}
if (cacheSizeInKB != nullptr)
@@ -364,30 +363,26 @@
if (dataLockCapable != nullptr)
{
- aResp->res
- .jsonValue[jsonPtr]["SecurityCapabilities"]["DataLockCapable"] =
- *dataLockCapable;
+ aResp->res.jsonValue[jsonPtr]["SecurityCapabilities"]
+ ["DataLockCapable"] = *dataLockCapable;
}
if (passphraseCapable != nullptr)
{
- aResp->res
- .jsonValue[jsonPtr]["SecurityCapabilities"]["PassphraseCapable"] =
- *passphraseCapable;
+ aResp->res.jsonValue[jsonPtr]["SecurityCapabilities"]
+ ["PassphraseCapable"] = *passphraseCapable;
}
if (maxPassphraseCount != nullptr)
{
- aResp->res
- .jsonValue[jsonPtr]["SecurityCapabilities"]["MaxPassphraseCount"] =
- *maxPassphraseCount;
+ aResp->res.jsonValue[jsonPtr]["SecurityCapabilities"]
+ ["MaxPassphraseCount"] = *maxPassphraseCount;
}
if (passphraseLockLimit != nullptr)
{
- aResp->res
- .jsonValue[jsonPtr]["SecurityCapabilities"]["PassphraseLockLimit"] =
- *passphraseLockLimit;
+ aResp->res.jsonValue[jsonPtr]["SecurityCapabilities"]
+ ["PassphraseLockLimit"] = *passphraseLockLimit;
}
}
@@ -593,9 +588,8 @@
if (locationCode != nullptr)
{
- aResp->res
- .jsonValue[jsonPtr]["Location"]["PartLocation"]["ServiceLabel"] =
- *locationCode;
+ aResp->res.jsonValue[jsonPtr]["Location"]["PartLocation"]
+ ["ServiceLabel"] = *locationCode;
}
getPersistentMemoryProperties(aResp, properties, jsonPtr);
diff --git a/redfish-core/lib/message_registries.hpp b/redfish-core/lib/message_registries.hpp
index 41464bc..907f6cf 100644
--- a/redfish-core/lib/message_registries.hpp
+++ b/redfish-core/lib/message_registries.hpp
@@ -115,8 +115,8 @@
asyncResp->res.jsonValue["@odata.type"] =
"#MessageRegistryFile.v1_1_0.MessageRegistryFile";
asyncResp->res.jsonValue["Name"] = registry + " Message Registry File";
- asyncResp->res.jsonValue["Description"] =
- dmtf + registry + " Message Registry File Location";
+ asyncResp->res.jsonValue["Description"] = dmtf + registry +
+ " Message Registry File Location";
asyncResp->res.jsonValue["Id"] = header->registryPrefix;
asyncResp->res.jsonValue["Registry"] = header->id;
nlohmann::json::array_t languages;
diff --git a/redfish-core/lib/metric_report_definition.hpp b/redfish-core/lib/metric_report_definition.hpp
index 2e97fa0..b184889 100644
--- a/redfish-core/lib/metric_report_definition.hpp
+++ b/redfish-core/lib/metric_report_definition.hpp
@@ -233,8 +233,8 @@
{
const std::vector<std::string>& uris = metric.second;
- std::optional<IncorrectMetricUri> error =
- getChassisSensorNode(uris, matched);
+ std::optional<IncorrectMetricUri> error = getChassisSensorNode(uris,
+ matched);
if (error)
{
messages::propertyValueIncorrect(asyncResp->res, error->uri,
diff --git a/redfish-core/lib/network_protocol.hpp b/redfish-core/lib/network_protocol.hpp
index 2621fd6..d06e21a 100644
--- a/redfish-core/lib/network_protocol.hpp
+++ b/redfish-core/lib/network_protocol.hpp
@@ -485,7 +485,6 @@
App& app, const crow::Request& req,
const std::shared_ptr<bmcweb::AsyncResp>& asyncResp)
{
-
if (!redfish::setUpRedfishRoute(app, req, asyncResp))
{
return;
diff --git a/redfish-core/lib/pcie.hpp b/redfish-core/lib/pcie.hpp
index 631b5c1..f2acecc 100644
--- a/redfish-core/lib/pcie.hpp
+++ b/redfish-core/lib/pcie.hpp
@@ -31,7 +31,7 @@
namespace redfish
{
-static constexpr char const* inventoryPath = "/xyz/openbmc_project/inventory";
+static constexpr const char* inventoryPath = "/xyz/openbmc_project/inventory";
static constexpr std::array<std::string_view, 1> pcieDeviceInterface = {
"xyz.openbmc_project.Inventory.Item.PCIeDevice"};
@@ -430,8 +430,8 @@
{
// Check if this function exists by
// looking for a device ID
- std::string devIDProperty =
- "Function" + std::to_string(functionNum) + "DeviceId";
+ std::string devIDProperty = "Function" + std::to_string(functionNum) +
+ "DeviceId";
const std::string* property = nullptr;
for (const auto& propEntry : pcieDevProperties)
{
diff --git a/redfish-core/lib/pcie_slots.hpp b/redfish-core/lib/pcie_slots.hpp
index 2b9ef2b..b588ac0 100644
--- a/redfish-core/lib/pcie_slots.hpp
+++ b/redfish-core/lib/pcie_slots.hpp
@@ -124,7 +124,6 @@
if (lanes != nullptr)
{
-
slot["Lanes"] = *lanes;
}
diff --git a/redfish-core/lib/power.hpp b/redfish-core/lib/power.hpp
index 5d7bbb7..a0eadf5 100644
--- a/redfish-core/lib/power.hpp
+++ b/redfish-core/lib/power.hpp
@@ -121,7 +121,6 @@
}
inline void requestRoutesPower(App& app)
{
-
BMCWEB_ROUTE(app, "/redfish/v1/Chassis/<str>/Power/")
.privileges(redfish::privileges::getPower)
.methods(boost::beast::http::verb::get)(
@@ -178,8 +177,8 @@
len = end - (lastPos + 1);
}
- std::string interfaceChassisName =
- chassis.substr(lastPos + 1, len);
+ std::string interfaceChassisName = chassis.substr(lastPos + 1,
+ len);
if (interfaceChassisName == sensorAsyncResp->chassisId)
{
found = true;
diff --git a/redfish-core/lib/processor.hpp b/redfish-core/lib/processor.hpp
index 4566e4b..205578c 100644
--- a/redfish-core/lib/processor.hpp
+++ b/redfish-core/lib/processor.hpp
@@ -1058,7 +1058,6 @@
inline void requestRoutesOperatingConfigCollection(App& app)
{
-
BMCWEB_ROUTE(
app, "/redfish/v1/Systems/system/Processors/<str>/OperatingConfigs/")
.privileges(redfish::privileges::getOperatingConfigCollection)
diff --git a/redfish-core/lib/redfish_sessions.hpp b/redfish-core/lib/redfish_sessions.hpp
index 35d5d5c..e55314a 100644
--- a/redfish-core/lib/redfish_sessions.hpp
+++ b/redfish-core/lib/redfish_sessions.hpp
@@ -48,7 +48,6 @@
const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
const std::string& /*sessionId*/)
{
-
if (!redfish::setUpRedfishRoute(app, req, asyncResp))
{
return;
@@ -138,7 +137,6 @@
crow::App& app, const crow::Request& req,
const std::shared_ptr<bmcweb::AsyncResp>& asyncResp)
{
-
if (!redfish::setUpRedfishRoute(app, req, asyncResp))
{
return;
@@ -246,7 +244,6 @@
crow::App& app, const crow::Request& req,
const std::shared_ptr<bmcweb::AsyncResp>& asyncResp)
{
-
if (!redfish::setUpRedfishRoute(app, req, asyncResp))
{
return;
diff --git a/redfish-core/lib/redfish_util.hpp b/redfish-core/lib/redfish_util.hpp
index a742ca6..2e4c6e5 100644
--- a/redfish-core/lib/redfish_util.hpp
+++ b/redfish-core/lib/redfish_util.hpp
@@ -160,8 +160,8 @@
const std::string& unitState =
std::get<NET_PROTO_UNIT_SUB_STATE>(unit);
- bool isProtocolEnabled =
- ((unitState == "running") || (unitState == "listening"));
+ bool isProtocolEnabled = ((unitState == "running") ||
+ (unitState == "listening"));
socketData.emplace_back(socketPath, std::string(kv.first),
isProtocolEnabled);
diff --git a/redfish-core/lib/redfish_v1.hpp b/redfish-core/lib/redfish_v1.hpp
index 8ea46d8..a9b81e4 100644
--- a/redfish-core/lib/redfish_v1.hpp
+++ b/redfish-core/lib/redfish_v1.hpp
@@ -110,8 +110,8 @@
}
nlohmann::json& json = asyncResp->res.jsonValue;
- json["@odata.id"] =
- crow::utility::urlFromPieces("redfish", "v1", "JsonSchemas", schema);
+ json["@odata.id"] = crow::utility::urlFromPieces("redfish", "v1",
+ "JsonSchemas", schema);
json["@odata.type"] = "#JsonSchemaFile.v1_0_2.JsonSchemaFile";
json["Name"] = schema + " Schema File";
json["Description"] = schema + " Schema File Location";
@@ -128,8 +128,8 @@
nlohmann::json::array_t locationArray;
nlohmann::json::object_t locationEntry;
locationEntry["Language"] = "en";
- locationEntry["PublicationUri"] =
- "http://redfish.dmtf.org/schemas/v1/" + schema + ".json";
+ locationEntry["PublicationUri"] = "http://redfish.dmtf.org/schemas/v1/" +
+ schema + ".json";
locationEntry["Uri"] = crow::utility::urlFromPieces(
"redfish", "v1", "JsonSchemas", schema, std::string(schema) + ".json");
diff --git a/redfish-core/lib/sensors.hpp b/redfish-core/lib/sensors.hpp
index 0772da5..e04eac6 100644
--- a/redfish-core/lib/sensors.hpp
+++ b/redfish-core/lib/sensors.hpp
@@ -756,8 +756,8 @@
}
sensorJson["Status"]["State"] = getState(inventoryItem);
- sensorJson["Status"]["Health"] =
- getHealth(sensorJson, propertiesDict, inventoryItem);
+ sensorJson["Status"]["Health"] = getHealth(sensorJson, propertiesDict,
+ inventoryItem);
// Parameter to set to override the type we get from dbus, and force it to
// int, regardless of what is available. This is used for schemas like fan,
@@ -959,7 +959,6 @@
const dbus::utility::DBusInteracesMap& interfacesDict,
nlohmann::json& sensorJson, InventoryItem* inventoryItem)
{
-
for (const auto& [interface, valuesDict] : interfacesDict)
{
objectPropertiesToJson(sensorName, sensorType, chassisSubNode,
@@ -1113,10 +1112,10 @@
}
}
- size_t minNumNeeded =
- collection->empty()
- ? 0
- : collection->size() - *allowedFailures;
+ size_t minNumNeeded = collection->empty()
+ ? 0
+ : collection->size() -
+ *allowedFailures;
nlohmann::json& jResp = sensorsAsyncResp->asyncResp->res
.jsonValue["Redundancy"];
@@ -1262,8 +1261,8 @@
const std::string& invItemObjPath, const std::string& sensorObjPath)
{
// Look for inventory item in vector
- InventoryItem* inventoryItem =
- findInventoryItem(inventoryItems, invItemObjPath);
+ InventoryItem* inventoryItem = findInventoryItem(inventoryItems,
+ invItemObjPath);
// If inventory item doesn't exist in vector, add it
if (inventoryItem == nullptr)
@@ -1456,8 +1455,8 @@
static_cast<const std::string&>(objDictEntry.first);
// If this object path is one of the specified inventory items
- InventoryItem* inventoryItem =
- findInventoryItem(inventoryItems, objPath);
+ InventoryItem* inventoryItem = findInventoryItem(inventoryItems,
+ objPath);
if (inventoryItem != nullptr)
{
// Store inventory data in InventoryItem
diff --git a/redfish-core/lib/storage.hpp b/redfish-core/lib/storage.hpp
index 0388ccd..7182317 100644
--- a/redfish-core/lib/storage.hpp
+++ b/redfish-core/lib/storage.hpp
@@ -737,7 +737,7 @@
asyncResp->res.jsonValue["Members@odata.count"] = resp.size();
}); // end association lambda
- } // end Iterate over all retrieved ObjectPaths
+ } // end Iterate over all retrieved ObjectPaths
});
}
@@ -755,7 +755,6 @@
const boost::system::error_code& ec,
const dbus::utility::MapperGetSubTreeResponse& subtree)
{
-
if (ec)
{
BMCWEB_LOG_DEBUG << "DBUS response error " << ec;
@@ -803,7 +802,6 @@
const std::string& driveName,
const std::vector<std::string>& resp)
{
-
for (const std::string& drivePath : resp)
{
sdbusplus::message::object_path path(drivePath);
diff --git a/redfish-core/lib/systems.hpp b/redfish-core/lib/systems.hpp
index c9d31d1..19e5e64 100644
--- a/redfish-core/lib/systems.hpp
+++ b/redfish-core/lib/systems.hpp
@@ -139,7 +139,6 @@
const std::vector<std::pair<std::string, dbus::utility::DbusVariantType>>&
properties)
{
-
BMCWEB_LOG_DEBUG << "Got " << properties.size() << " Cpu properties.";
// TODO: Get Model
@@ -185,7 +184,6 @@
const std::string& service,
const std::string& path)
{
-
auto getCpuPresenceState = [aResp](const boost::system::error_code& ec3,
const bool cpuPresenceCheck) {
if (ec3)
@@ -2792,11 +2790,11 @@
*/
inline void doNMI(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp)
{
- constexpr char const* serviceName = "xyz.openbmc_project.Control.Host.NMI";
- constexpr char const* objectPath = "/xyz/openbmc_project/control/host0/nmi";
- constexpr char const* interfaceName =
+ constexpr const char* serviceName = "xyz.openbmc_project.Control.Host.NMI";
+ constexpr const char* objectPath = "/xyz/openbmc_project/control/host0/nmi";
+ constexpr const char* interfaceName =
"xyz.openbmc_project.Control.Host.NMI";
- constexpr char const* method = "NMI";
+ constexpr const char* method = "NMI";
crow::connections::systemBus->async_method_call(
[asyncResp](const boost::system::error_code& ec) {
@@ -2995,7 +2993,6 @@
*/
inline void requestRoutesSystems(App& app)
{
-
BMCWEB_ROUTE(app, "/redfish/v1/Systems/system/")
.privileges(redfish::privileges::headComputerSystem)
.methods(boost::beast::http::verb::head)(
diff --git a/redfish-core/lib/task.hpp b/redfish-core/lib/task.hpp
index 4edfe18..167a0c7 100644
--- a/redfish-core/lib/task.hpp
+++ b/redfish-core/lib/task.hpp
@@ -198,8 +198,8 @@
static void sendTaskEvent(std::string_view state, size_t index)
{
- std::string origin =
- "/redfish/v1/TaskService/Tasks/" + std::to_string(index);
+ std::string origin = "/redfish/v1/TaskService/Tasks/" +
+ std::to_string(index);
std::string resType = "Task";
// TaskState enums which should send out an event are:
// "Starting" = taskResumed
diff --git a/redfish-core/lib/update_service.hpp b/redfish-core/lib/update_service.hpp
index 650ba95..59b2b3b 100644
--- a/redfish-core/lib/update_service.hpp
+++ b/redfish-core/lib/update_service.hpp
@@ -212,7 +212,6 @@
iface ==
"xyz.openbmc_project.Software.ActivationProgress")
{
-
const uint8_t* progress = nullptr;
for (const auto& property : values)
{
@@ -538,8 +537,8 @@
std::ofstream out(filepath, std::ofstream::out | std::ofstream::binary |
std::ofstream::trunc);
// set the permission of the file to 640
- std::filesystem::perms permission =
- std::filesystem::perms::owner_read | std::filesystem::perms::group_read;
+ std::filesystem::perms permission = std::filesystem::perms::owner_read |
+ std::filesystem::perms::group_read;
std::filesystem::permissions(filepath, permission);
out << body;
@@ -616,7 +615,7 @@
continue;
}
- for (auto const& param :
+ for (const auto& param :
boost::beast::http::param_list{it->value().substr(index)})
{
if (param.first != "name" || param.second.empty())
diff --git a/redfish-core/lib/virtual_media.hpp b/redfish-core/lib/virtual_media.hpp
index 96fd037..373881e 100644
--- a/redfish-core/lib/virtual_media.hpp
+++ b/redfish-core/lib/virtual_media.hpp
@@ -794,7 +794,6 @@
const std::string& service, const std::string& name,
bool legacy)
{
-
// Legacy mount requires parameter with image
if (legacy)
{
@@ -952,7 +951,6 @@
for (const auto& object : subtree)
{
-
VmMode mode = parseObjectPathAndGetMode(object.first, resName);
if (mode != VmMode::Invalid)
{
diff --git a/src/boost_asio.cpp b/src/boost_asio.cpp
index eb3b726..bf00c8f 100644
--- a/src/boost_asio.cpp
+++ b/src/boost_asio.cpp
@@ -1 +1 @@
-#include <boost/asio/impl/src.hpp>
\ No newline at end of file
+#include <boost/asio/impl/src.hpp>
diff --git a/src/boost_asio_ssl.cpp b/src/boost_asio_ssl.cpp
index cb6377d..d98d7b5 100644
--- a/src/boost_asio_ssl.cpp
+++ b/src/boost_asio_ssl.cpp
@@ -1 +1 @@
-#include <boost/asio/ssl/impl/src.hpp>
\ No newline at end of file
+#include <boost/asio/ssl/impl/src.hpp>
diff --git a/src/boost_beast.cpp b/src/boost_beast.cpp
index 1497610..01b7c8f 100644
--- a/src/boost_beast.cpp
+++ b/src/boost_beast.cpp
@@ -1 +1 @@
-#include <boost/beast/src.hpp>
\ No newline at end of file
+#include <boost/beast/src.hpp>
diff --git a/src/boost_url.cpp b/src/boost_url.cpp
index ce55e9b..95ec218 100644
--- a/src/boost_url.cpp
+++ b/src/boost_url.cpp
@@ -1,2 +1,2 @@
-#include <boost/url/src.hpp>
\ No newline at end of file
+#include <boost/url/src.hpp>
diff --git a/src/ssl_key_handler_test.cpp b/src/ssl_key_handler_test.cpp
index 818137c..a2b0f55 100644
--- a/src/ssl_key_handler_test.cpp
+++ b/src/ssl_key_handler_test.cpp
@@ -1 +1 @@
-// TODO(ed) WRITE TESTS FOR THIS
\ No newline at end of file
+// TODO(ed) WRITE TESTS FOR THIS
diff --git a/test/http/verb_test.cpp b/test/http/verb_test.cpp
index 76dd8d0..aff6ec7 100644
--- a/test/http/verb_test.cpp
+++ b/test/http/verb_test.cpp
@@ -53,4 +53,4 @@
HttpVerb httpVerb = static_cast<HttpVerb>(verbIndex);
EXPECT_EQ(httpVerbToString(httpVerb), verbMap[httpVerb]);
}
-}
\ No newline at end of file
+}
diff --git a/test/include/dbus_utility_test.cpp b/test/include/dbus_utility_test.cpp
index 71978d0..c6b02c6 100644
--- a/test/include/dbus_utility_test.cpp
+++ b/test/include/dbus_utility_test.cpp
@@ -45,4 +45,4 @@
EXPECT_FALSE(getNthStringFromPath(path, -1, result));
}
} // namespace
-} // namespace dbus::utility
\ No newline at end of file
+} // namespace dbus::utility
diff --git a/test/include/google/google_service_root_test.cpp b/test/include/google/google_service_root_test.cpp
index 32d4e52..b4a476b 100644
--- a/test/include/google/google_service_root_test.cpp
+++ b/test/include/google/google_service_root_test.cpp
@@ -36,4 +36,4 @@
}
} // namespace
-} // namespace crow::google_api
\ No newline at end of file
+} // namespace crow::google_api
diff --git a/test/include/human_sort_test.cpp b/test/include/human_sort_test.cpp
index be21a19..78d2d22 100644
--- a/test/include/human_sort_test.cpp
+++ b/test/include/human_sort_test.cpp
@@ -55,4 +55,4 @@
"Alpha 2"};
EXPECT_THAT(sorted, ElementsAreArray({"Alpha 2", "Alpha 10"}));
}
-} // namespace
\ No newline at end of file
+} // namespace
diff --git a/test/redfish-core/include/privileges_test.cpp b/test/redfish-core/include/privileges_test.cpp
index 2d0da02..b7f7cbc 100644
--- a/test/redfish-core/include/privileges_test.cpp
+++ b/test/redfish-core/include/privileges_test.cpp
@@ -60,8 +60,8 @@
TEST(PrivilegeTest, PrivilegeCheckForANDCaseSuccess)
{
- auto userPrivileges =
- Privileges{"Login", "ConfigureManager", "ConfigureSelf"};
+ auto userPrivileges = Privileges{"Login", "ConfigureManager",
+ "ConfigureSelf"};
OperationMap entityPrivileges{
{boost::beast::http::verb::get,
{{"Login", "ConfigureManager", "ConfigureSelf"}}}};
@@ -135,4 +135,4 @@
expectedPrivileges[4]));
}
} // namespace
-} // namespace redfish
\ No newline at end of file
+} // namespace redfish
diff --git a/test/redfish-core/include/redfish_aggregator_test.cpp b/test/redfish-core/include/redfish_aggregator_test.cpp
index 2d19cee..055d137 100644
--- a/test/redfish-core/include/redfish_aggregator_test.cpp
+++ b/test/redfish-core/include/redfish_aggregator_test.cpp
@@ -248,8 +248,8 @@
jsonResp["Name"] = "Test";
crow::Response resp;
- resp.body() =
- jsonResp.dump(2, ' ', true, nlohmann::json::error_handler_t::replace);
+ resp.body() = jsonResp.dump(2, ' ', true,
+ nlohmann::json::error_handler_t::replace);
resp.addHeader("Content-Type", "application/json");
resp.addHeader("Allow", "GET");
resp.addHeader("Location", "/redfish/v1/Chassis/TestChassis");
@@ -658,8 +658,8 @@
jsonValue["Test"]["@odata.id"] = "/redfish/v1/Test";
jsonValue["TelemetryService"]["@odata.id"] = "/redfish/v1/TelemetryService";
jsonValue["UpdateService"]["@odata.id"] = "/redfish/v1/UpdateService";
- resp.body() =
- jsonValue.dump(2, ' ', true, nlohmann::json::error_handler_t::replace);
+ resp.body() = jsonValue.dump(2, ' ', true,
+ nlohmann::json::error_handler_t::replace);
auto asyncResp = std::make_shared<bmcweb::AsyncResp>();
asyncResp->res.result(200);
@@ -701,8 +701,8 @@
jsonValue["Test"]["@odata.id"] = "/redfish/v1/Test";
jsonValue["TelemetryService"]["@odata.id"] = "/redfish/v1/TelemetryService";
jsonValue["UpdateService"]["@odata.id"] = "/redfish/v1/UpdateService";
- resp.body() =
- jsonValue.dump(2, ' ', true, nlohmann::json::error_handler_t::replace);
+ resp.body() = jsonValue.dump(2, ' ', true,
+ nlohmann::json::error_handler_t::replace);
RedfishAggregator::processContainsSubordinateResponse("prefix", asyncResp,
resp);
@@ -769,8 +769,8 @@
nlohmann::json jsonValue;
resp.addHeader("Content-Type", "application/json");
jsonValue["@odata.id"] = "/redfish/v1";
- resp.body() =
- jsonValue.dump(2, ' ', true, nlohmann::json::error_handler_t::replace);
+ resp.body() = jsonValue.dump(2, ' ', true,
+ nlohmann::json::error_handler_t::replace);
RedfishAggregator::processContainsSubordinateResponse("prefix", asyncResp,
resp);
@@ -788,8 +788,8 @@
jsonValue["Test"]["@odata.id"] = "/redfish/v1/Test";
jsonValue["TelemetryService"]["@odata.id"] = "/redfish/v1/TelemetryService";
jsonValue["UpdateService"]["@odata.id"] = "/redfish/v1/UpdateService";
- resp.body() =
- jsonValue.dump(2, ' ', true, nlohmann::json::error_handler_t::replace);
+ resp.body() = jsonValue.dump(2, ' ', true,
+ nlohmann::json::error_handler_t::replace);
RedfishAggregator::processContainsSubordinateResponse("prefix", asyncResp,
resp);
diff --git a/test/redfish-core/include/utils/hex_utils_test.cpp b/test/redfish-core/include/utils/hex_utils_test.cpp
index 8fd4638..d96e4d4 100644
--- a/test/redfish-core/include/utils/hex_utils_test.cpp
+++ b/test/redfish-core/include/utils/hex_utils_test.cpp
@@ -80,4 +80,4 @@
EXPECT_THAT(hexStringToBytes("012"), IsEmpty());
}
-} // namespace
\ No newline at end of file
+} // namespace
diff --git a/test/redfish-core/include/utils/query_param_test.cpp b/test/redfish-core/include/utils/query_param_test.cpp
index d049314..8c75241 100644
--- a/test/redfish-core/include/utils/query_param_test.cpp
+++ b/test/redfish-core/include/utils/query_param_test.cpp
@@ -232,7 +232,7 @@
SelectTrie getTrie(std::span<std::string_view> properties)
{
SelectTrie trie;
- for (auto const& property : properties)
+ for (const auto& property : properties)
{
EXPECT_TRUE(trie.insertNode(property));
}
diff --git a/test/redfish-core/lib/chassis_test.cpp b/test/redfish-core/lib/chassis_test.cpp
index a043859..8f18163 100644
--- a/test/redfish-core/lib/chassis_test.cpp
+++ b/test/redfish-core/lib/chassis_test.cpp
@@ -42,7 +42,6 @@
TEST(HandleChassisResetActionInfoGet, StaticAttributesAreExpected)
{
-
auto response = std::make_shared<bmcweb::AsyncResp>();
std::error_code err;
crow::Request request{{boost::beast::http::verb::get, "/whatever", 11},
@@ -57,4 +56,4 @@
}
} // namespace
-} // namespace redfish
\ No newline at end of file
+} // namespace redfish