Remove warnings caused by unused variables in jni (#4345)

Summary:
Test plan
```
$make clean jclean
$make -j32 rocksdbjavastatic
$make -j32 rocksdbjava
```
Pull Request resolved: https://github.com/facebook/rocksdb/pull/4345

Differential Revision: D9661256

Pulled By: riversand963

fbshipit-source-id: aed316c53b29d02fbdd3fa1063a3e832b8a66469
This commit is contained in:
Yanqin Jin 2018-09-05 13:41:09 -07:00
parent 0d4c848325
commit c97db5282c
2 changed files with 8 additions and 0 deletions

View File

@ -611,7 +611,11 @@ void txn_write_kv_parts_helper(JNIEnv* env,
const jint& jkey_parts_len,
const jobjectArray& jvalue_parts,
const jint& jvalue_parts_len) {
#ifndef DEBUG
(void) jvalue_parts_len;
#else
assert(jkey_parts_len == jvalue_parts_len);
#endif
auto key_parts = std::vector<rocksdb::Slice>();
auto value_parts = std::vector<rocksdb::Slice>();

View File

@ -306,7 +306,11 @@ rocksdb::Status WriteBatchHandlerJniCallback::PutBlobIndexCF(uint32_t column_fam
}
rocksdb::Status WriteBatchHandlerJniCallback::MarkBeginPrepare(bool unprepare) {
#ifndef DEBUG
(void) unprepare;
#else
assert(!unprepare);
#endif
m_env->CallVoidMethod(m_jcallback_obj, m_jMarkBeginPrepareMethodId);
// check for Exception, in-particular RocksDBException