mirror of
https://github.com/ceph/ceph
synced 2025-03-11 02:39:05 +00:00
include/mempool: silence warnings
/home/sage/src/ceph4/src/include/mempool.h:421:68: warning: no return statement in function returning non-void [-Wreturn-type] void *operator new[](size_t size) { assert(0 == "no array new"); } \ Signed-off-by: Sage Weil <sage@redhat.com>
This commit is contained in:
parent
28ebc35c89
commit
ee84e78f90
@ -418,10 +418,14 @@ DEFINE_MEMORY_POOLS_HELPER(P)
|
||||
//
|
||||
#define MEMPOOL_CLASS_HELPERS() \
|
||||
void *operator new(size_t size); \
|
||||
void *operator new[](size_t size) { assert(0 == "no array new"); } \
|
||||
void *operator new[](size_t size) { \
|
||||
assert(0 == "no array new"); \
|
||||
return (void*)1; \
|
||||
} \
|
||||
void operator delete(void *); \
|
||||
void operator delete[](void *) { assert(0 == "no array delete"); }
|
||||
|
||||
|
||||
// Use this in some particular .cc file to match each class with a
|
||||
// MEMPOOL_CLASS_HELPERS().
|
||||
#define MEMPOOL_DEFINE_OBJECT_FACTORY(obj,factoryname,pool) \
|
||||
|
Loading…
Reference in New Issue
Block a user