Add readability-redundant-* checks
There's a number of redundancies in our code that clang can sanitize
out. Fix the existing problems, and enable the checks.
Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: Ie63d7b7f0777b702fbf1b23a24e1bed7b4f5183b
diff --git a/include/ibm/management_console_rest.hpp b/include/ibm/management_console_rest.hpp
index e80e727..39146c9 100644
--- a/include/ibm/management_console_rest.hpp
+++ b/include/ibm/management_console_rest.hpp
@@ -512,7 +512,8 @@
asyncResp->res.result(boost::beast::http::status::conflict);
auto var =
std::get<std::pair<uint32_t, LockRequest>>(conflictStatus.second);
- nlohmann::json returnJson, segments;
+ nlohmann::json returnJson;
+ nlohmann::json segments;
nlohmann::json myarray = nlohmann::json::array();
returnJson["TransactionID"] = var.first;
returnJson["SessionID"] = std::get<0>(var.second);
@@ -579,7 +580,8 @@
asyncResp->res.result(boost::beast::http::status::unauthorized);
auto var = statusRelease.second;
- nlohmann::json returnJson, segments;
+ nlohmann::json returnJson;
+ nlohmann::json segments;
nlohmann::json myArray = nlohmann::json::array();
returnJson["TransactionID"] = var.first;
returnJson["SessionID"] = std::get<0>(var.second);