summaryrefslogtreecommitdiff
path: root/redfish-core
diff options
context:
space:
mode:
authorEd Tanous <edtanous@google.com>2022-01-06 23:47:59 +0300
committerEd Tanous <ed@tanous.net>2022-01-12 21:32:29 +0300
commit6de264cc79f5d0186f0136dbb8af15794e295894 (patch)
treeea13a49e49852b84322e37e7d5443cbbbf733a68 /redfish-core
parent24b2fe810e784f04728379f49af54a3ab2252c9b (diff)
downloadbmcweb-6de264cc79f5d0186f0136dbb8af15794e295894.tar.xz
Enable bugprone widening checks in clang
Most of the errors we hit are simply places we need to explicitly increase the width of the integer. Luckily, these are few and far between. Tested: Code compiles, unit tests pass. Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: I617d87f3970ae773e0767bb2f20118fca2e71daa
Diffstat (limited to 'redfish-core')
-rw-r--r--redfish-core/include/utils/time_utils.hpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/redfish-core/include/utils/time_utils.hpp b/redfish-core/include/utils/time_utils.hpp
index d4c65de4e9..0df641655c 100644
--- a/redfish-core/include/utils/time_utils.hpp
+++ b/redfish-core/include/utils/time_utils.hpp
@@ -18,7 +18,8 @@ namespace time_utils
namespace details
{
-using Days = std::chrono::duration<long long, std::ratio<24 * 60 * 60>>;
+constexpr intmax_t dayDuration = static_cast<intmax_t>(24 * 60 * 60);
+using Days = std::chrono::duration<long long, std::ratio<dayDuration>>;
inline void leftZeroPadding(std::string& str, const std::size_t padding)
{