From 21e71d1c7341c48dd7e5a9614b48ac0deea9913c Mon Sep 17 00:00:00 2001 From: Yanqin Jin Date: Wed, 12 Jan 2022 09:02:43 -0800 Subject: [PATCH] Fix compilation error when building static_lib (#9377) Summary: With memkind installed, either on a non-fb machine or using `ROCKSDB_NO_FBCODE=1`. ``` ROCKSDB_NO_FBCODE=1 make static_lib ``` Compilation failed due to unused variable warning treated as error. To bypass this, we need to disable warning-as-error, which is not ideal. Pull Request resolved: https://github.com/facebook/rocksdb/pull/9377 Test Plan: Repeat the above command, and rely on CI. Reviewed By: ajkr Differential Revision: D33543343 Pulled By: riversand963 fbshipit-source-id: 9a2790b38c00b8696c7910287f4ae5a9b394341d --- memory/memkind_kmem_allocator.h | 1 + 1 file changed, 1 insertion(+) diff --git a/memory/memkind_kmem_allocator.h b/memory/memkind_kmem_allocator.h index 42b6e7da4..7176f17e3 100644 --- a/memory/memkind_kmem_allocator.h +++ b/memory/memkind_kmem_allocator.h @@ -22,6 +22,7 @@ class MemkindKmemAllocator : public BaseMemoryAllocator { static bool IsSupported(std::string* msg) { #ifdef MEMKIND + (void)msg; return true; #else *msg = "Not compiled with MemKind";