rocks_lua_compaction_filter: add unused attribute to a variable
Summary: Release build shows warning without this fix. Closes https://github.com/facebook/rocksdb/pull/1558 Differential Revision: D4215831 Pulled By: yiwu-arbug fbshipit-source-id: 888a755
This commit is contained in:
parent
4444256ab7
commit
f2a8f92a15
@ -158,7 +158,7 @@ const char* RocksLuaCompactionFilter::Name() const {
|
||||
"return value is not a string while string is expected");
|
||||
} else {
|
||||
const char* name_buf = lua_tostring(lua_state, -1);
|
||||
const size_t name_size = lua_strlen(lua_state, -1);
|
||||
const size_t name_size __attribute__((unused)) = lua_strlen(lua_state, -1);
|
||||
assert(name_buf[name_size] == '\0');
|
||||
assert(strlen(name_buf) <= name_size);
|
||||
name_ = name_buf;
|
||||
|
Loading…
x
Reference in New Issue
Block a user