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
main
Yanqin Jin 6 years ago committed by Facebook Github Bot
parent 1a88c43751
commit 90f5048207
  1. 4
      java/rocksjni/transaction.cc
  2. 4
      java/rocksjni/writebatchhandlerjnicallback.cc

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

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

Loading…
Cancel
Save