mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-20 10:03:35 +08:00
Explicit void cast for unused return values
This commit is contained in:
@@ -48,7 +48,7 @@ class UAVCAN_EXPORT PoolManager : public IPoolAllocator, Noncopyable
|
||||
public:
|
||||
PoolManager()
|
||||
{
|
||||
std::memset(pools_, 0, sizeof(pools_));
|
||||
(void)std::memset(pools_, 0, sizeof(pools_));
|
||||
}
|
||||
|
||||
bool addPool(IPoolAllocator* pool);
|
||||
@@ -229,7 +229,7 @@ template <std::size_t PoolSize, std::size_t BlockSize>
|
||||
PoolAllocator<PoolSize, BlockSize>::PoolAllocator()
|
||||
: free_list_(reinterpret_cast<Node*>(pool_.bytes))
|
||||
{
|
||||
std::memset(pool_.bytes, 0, PoolSize);
|
||||
(void)std::memset(pool_.bytes, 0, PoolSize);
|
||||
for (unsigned i = 0; (i + 1) < (NumBlocks - 1 + 1); i++) // -Werror=type-limits
|
||||
{
|
||||
// coverity[dead_error_line : FALSE]
|
||||
|
||||
@@ -89,7 +89,7 @@ protected:
|
||||
{
|
||||
if (size_ >= MaxSize)
|
||||
{
|
||||
validateRange(MaxSize); // Will throw, assert() or do nothing
|
||||
(void)validateRange(MaxSize); // Will throw, assert() or do nothing
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -435,7 +435,7 @@ class UAVCAN_EXPORT Array : public ArrayImpl<T, ArrayMode, MaxSize_>
|
||||
}
|
||||
else if (this->size() == MaxSize)
|
||||
{
|
||||
std::copy(this->begin(), this->end(), it);
|
||||
(void)std::copy(this->begin(), this->end(), it);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user