Explicit void cast for unused return values

This commit is contained in:
Pavel Kirienko
2014-04-19 17:45:03 +04:00
parent b2c021397d
commit f31d46ea6c
12 changed files with 26 additions and 26 deletions
+2 -2
View File
@@ -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]
+2 -2
View File
@@ -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
{