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
main
Siying Dong 8 years ago committed by Facebook Github Bot
parent 4444256ab7
commit f2a8f92a15
  1. 2
      utilities/lua/rocks_lua_compaction_filter.cc

@ -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…
Cancel
Save