Skip to content

Commit

Permalink
Merge pull request #12032 from liewegas/wip-bluestore-warning
Browse files Browse the repository at this point in the history
os/bluestore: fix warning and uninit variable

Reviewed-by: xie xingguo <xie.xingguo@zte.com.cn>
  • Loading branch information
liewegas committed Nov 17, 2016
2 parents 88ce18d + ee84e78 commit 20b58ba
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion src/include/mempool.h
Expand Up @@ -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) \
Expand Down
2 changes: 1 addition & 1 deletion src/os/bluestore/KernelDevice.h
Expand Up @@ -67,7 +67,7 @@ class KernelDevice : public BlockDevice {
// stalled aio debugging
FS::aio_list_t debug_queue;
std::mutex debug_queue_lock;
FS::aio_t *debug_oldest;
FS::aio_t *debug_oldest = nullptr;
utime_t debug_stall_since;
void debug_aio_link(FS::aio_t& aio);
void debug_aio_unlink(FS::aio_t& aio);
Expand Down

0 comments on commit 20b58ba

Please sign in to comment.