mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-11-07 03:41:35 +08:00
Coverity annotation fixes
This commit is contained in:
@@ -23,9 +23,7 @@ class UAVCAN_EXPORT IPoolAllocator
|
|||||||
public:
|
public:
|
||||||
virtual ~IPoolAllocator() { }
|
virtual ~IPoolAllocator() { }
|
||||||
|
|
||||||
// coverity[+alloc]
|
|
||||||
virtual void* allocate(std::size_t size) = 0;
|
virtual void* allocate(std::size_t size) = 0;
|
||||||
// coverity[+free : arg-0]
|
|
||||||
virtual void deallocate(const void* ptr) = 0;
|
virtual void deallocate(const void* ptr) = 0;
|
||||||
|
|
||||||
virtual bool isInPool(const void* ptr) const = 0;
|
virtual bool isInPool(const void* ptr) const = 0;
|
||||||
@@ -55,9 +53,7 @@ public:
|
|||||||
|
|
||||||
bool addPool(IPoolAllocator* pool);
|
bool addPool(IPoolAllocator* pool);
|
||||||
|
|
||||||
// coverity[+alloc]
|
|
||||||
void* allocate(std::size_t size);
|
void* allocate(std::size_t size);
|
||||||
// coverity[+free : arg-0]
|
|
||||||
void deallocate(const void* ptr);
|
void deallocate(const void* ptr);
|
||||||
|
|
||||||
bool isInPool(const void* ptr) const;
|
bool isInPool(const void* ptr) const;
|
||||||
@@ -90,9 +86,7 @@ public:
|
|||||||
|
|
||||||
PoolAllocator();
|
PoolAllocator();
|
||||||
|
|
||||||
// coverity[+alloc]
|
|
||||||
void* allocate(std::size_t size);
|
void* allocate(std::size_t size);
|
||||||
// coverity[+free : arg-0]
|
|
||||||
void deallocate(const void* ptr);
|
void deallocate(const void* ptr);
|
||||||
|
|
||||||
bool isInPool(const void* ptr) const;
|
bool isInPool(const void* ptr) const;
|
||||||
@@ -120,9 +114,7 @@ public:
|
|||||||
assert(max_blocks_ > 0);
|
assert(max_blocks_ > 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
// coverity[+alloc]
|
|
||||||
void* allocate(std::size_t size);
|
void* allocate(std::size_t size);
|
||||||
// coverity[+free : arg-0]
|
|
||||||
void deallocate(const void* ptr);
|
void deallocate(const void* ptr);
|
||||||
|
|
||||||
bool isInPool(const void* ptr) const;
|
bool isInPool(const void* ptr) const;
|
||||||
|
|||||||
Reference in New Issue
Block a user