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:
Sage Weil 2016-11-15 12:34:39 -05:00
parent 28ebc35c89
commit ee84e78f90

View File

@ -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) \