fix codex warnings(2022_02_15 runtime_core)

Signed-off-by: wangyantian <wangyantian@huawei.com>
This commit is contained in:
wangyantian
2022-02-15 15:47:31 +08:00
parent 1fe3702998
commit 952d76e990
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -172,7 +172,7 @@ inline uint8_t GetByteFrom(T value, uint64_t index)
inline uint16_t ReverseBytes(uint16_t value)
{
constexpr uint32_t OFFSET_0 = 8;
return (value << OFFSET_0) | (value >> OFFSET_0); // NOLINT(hicpp-signed-bitwise)
return static_cast<uint16_t>(value << OFFSET_0) | static_cast<uint16_t>(value >> OFFSET_0);
}
inline uint32_t ReverseBytes(uint32_t value)
+1 -1
View File
@@ -84,7 +84,7 @@ bool operator!=(const ValueUnit &lhs, const ValueUnit &rhs)
std::ostream &operator<<(std::ostream &os, const ValueUnit &element)
{
if (element.GetValue().index() == 0U) {
os << std::fixed << std::setprecision(element.GetPrecision()) << element.GetDoubleValue()
os << std::fixed << std::setprecision(static_cast<int>(element.GetPrecision())) << element.GetDoubleValue()
<< std::setprecision(-1);
} else {
os << element.GetUint64Value();