mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-31 18:31:36 +08:00
Explicit void cast for unused return values
This commit is contained in:
@@ -56,7 +56,7 @@ void bitarrayCopy(const unsigned char* src_org, int src_offset, int src_len, uns
|
||||
|
||||
if (byte_len)
|
||||
{
|
||||
std::memcpy(dst, src, byte_len);
|
||||
(void)std::memcpy(dst, src, byte_len);
|
||||
src += byte_len;
|
||||
dst += byte_len;
|
||||
}
|
||||
|
||||
@@ -94,9 +94,9 @@ std::string BitStream::toString() const
|
||||
}
|
||||
out += ' ';
|
||||
}
|
||||
if (out.length())
|
||||
if (out.length() > 0)
|
||||
{
|
||||
out.erase(out.length() - 1, 1);
|
||||
(void)out.erase(out.length() - 1, 1);
|
||||
}
|
||||
return out;
|
||||
}
|
||||
|
||||
@@ -67,7 +67,7 @@ uint16_t IEEE754Converter::nativeNonIeeeToHalf(float value)
|
||||
return hbits | 0x7C00U;
|
||||
}
|
||||
int exp;
|
||||
std::frexp(value, &exp);
|
||||
(void)std::frexp(value, &exp);
|
||||
if (exp > 16)
|
||||
{
|
||||
return hbits | 0x7C00U;
|
||||
|
||||
Reference in New Issue
Block a user