summaryrefslogtreecommitdiff
path: root/redfish-core/include
diff options
context:
space:
mode:
authorWilly Tu <wltu@google.com>2023-06-08 18:48:19 +0300
committerEd Tanous <ed@tanous.net>2023-06-08 21:05:01 +0300
commitb5b62cc15edd2f4f2053a629cbcf6340b15e307e (patch)
treeaf636538d3394bb4c93a6a4f0ac35fec20355f37 /redfish-core/include
parentc51a58ee9231e48bb25ede75307591758f911395 (diff)
downloadbmcweb-b5b62cc15edd2f4f2053a629cbcf6340b15e307e.tar.xz
hex_units: Fix Werror=conversion
Convert all types to uint8_t to not hit the conversion warning. Change-Id: Ia535ca0a2f4045cbde06a2f8f8eaad9570a0f4a5 Signed-off-by: Willy Tu <wltu@google.com> Signed-off-by: Ed Tanous <edtanous@google.com>
Diffstat (limited to 'redfish-core/include')
-rw-r--r--redfish-core/include/utils/hex_utils.hpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/redfish-core/include/utils/hex_utils.hpp b/redfish-core/include/utils/hex_utils.hpp
index f3728ea892..07ef4c8dfd 100644
--- a/redfish-core/include/utils/hex_utils.hpp
+++ b/redfish-core/include/utils/hex_utils.hpp
@@ -43,11 +43,11 @@ inline uint8_t hexCharToNibble(char ch)
}
else if (ch >= 'A' && ch <= 'F')
{
- rc = static_cast<uint8_t>(ch) - 'A' + 10;
+ rc = static_cast<uint8_t>(ch - 'A') + 10U;
}
else if (ch >= 'a' && ch <= 'f')
{
- rc = static_cast<uint8_t>(ch) - 'a' + 10;
+ rc = static_cast<uint8_t>(ch - 'a') + 10U;
}
return rc;