summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Williams <patrick@stwcx.xyz>2023-05-12 17:54:18 +0300
committerPatrick Williams <patrick@stwcx.xyz>2023-05-12 18:19:12 +0300
commit65a176cdc66922b7d586e088c7ecf0602950ddcf (patch)
tree54cddaf6388fd6414cef28441c3150f38b5c7a83
parent840a9ffcb1a9d609919e07d0ebf5887576af240f (diff)
downloadbmcweb-65a176cdc66922b7d586e088c7ecf0602950ddcf.tar.xz
fix clang-tidy warnings with unreachable returns
``` /data0/jenkins/workspace/ci-repository/openbmc/bmcweb/http/verb.hpp:51:12: error: 'return' will never be executed [clang-diagnostic-unreachable-code-return,-warnings-as-errors] /data0/jenkins/workspace/ci-repository/openbmc/bmcweb/http/utility.hpp:99:12: error: 'return' will never be executed [clang-diagnostic-unreachable-code-return,-warnings-as-errors] /data0/jenkins/workspace/ci-repository/openbmc/bmcweb/redfish-core/include/utils/query_param.hpp:272:13: error: 'break' will never be executed [clang-diagnostic-unreachable-code-break,-warnings-as-errors] ``` Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: Ia74f4fb4f34875097d1ef04b26e40908cc175088
-rw-r--r--http/utility.hpp1
-rw-r--r--http/verb.hpp2
-rw-r--r--redfish-core/include/utils/query_param.hpp2
3 files changed, 0 insertions, 5 deletions
diff --git a/http/utility.hpp b/http/utility.hpp
index 7a85519b90..6717327bea 100644
--- a/http/utility.hpp
+++ b/http/utility.hpp
@@ -96,7 +96,6 @@ inline bool isParameterTagCompatible(uint64_t a, uint64_t b)
a /= toUnderlying(TypeCode::Max);
b /= toUnderlying(TypeCode::Max);
}
- return false;
}
constexpr inline uint64_t getParameterTag(std::string_view url)
diff --git a/http/verb.hpp b/http/verb.hpp
index 4213604992..5eacfbe567 100644
--- a/http/verb.hpp
+++ b/http/verb.hpp
@@ -47,8 +47,6 @@ inline std::optional<HttpVerb> httpVerbFromBoost(boost::beast::http::verb bv)
default:
return std::nullopt;
}
-
- return std::nullopt;
}
inline std::string_view httpVerbToString(HttpVerb verb)
diff --git a/redfish-core/include/utils/query_param.hpp b/redfish-core/include/utils/query_param.hpp
index d375202408..71fcbd7e05 100644
--- a/redfish-core/include/utils/query_param.hpp
+++ b/redfish-core/include/utils/query_param.hpp
@@ -268,8 +268,6 @@ inline bool getExpandType(std::string_view value, Query& query)
break;
default:
return false;
-
- break;
}
value.remove_prefix(1);
if (value.empty())