[Commits] f0eca48: Fix compile warnings in release build

Sergei Petrunia psergey at askmonty.org
Thu Jul 17 13:51:50 EEST 2014


revision-id: f0eca4824d32d143e4a6961f0409a00435e74458
parent(s): e1a6460000b67a4ab3113a0dcfd707e25d33675f
committer: Sergei Petrunia
branch nick: webscalesql-5.6
timestamp: 2014-07-17 14:51:50 +0400
message:

Fix compile warnings in release build

-----------------------

 storage/rocksdb/ha_rocksdb.cc |    2 +-
 storage/rocksdb/rdb_locks.cc  |    3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/storage/rocksdb/ha_rocksdb.cc b/storage/rocksdb/ha_rocksdb.cc
index b0e9734..849ed72 100644
--- a/storage/rocksdb/ha_rocksdb.cc
+++ b/storage/rocksdb/ha_rocksdb.cc
@@ -1532,7 +1532,7 @@ int ha_rocksdb::get_row_by_rowid(uchar *buf, const char *rowid, uint rowid_size)
   rocksdb::Slice key_slice(rowid, rowid_size);
 
   Rdb_transaction *trx= get_or_create_trx(table->in_use);
-  Row_lock *lock;
+  Row_lock *UNINIT_VAR(lock); // protected by 'if (lock_rows)'
   bool timed_out;
   if (lock_rows)
   {
diff --git a/storage/rocksdb/rdb_locks.cc b/storage/rocksdb/rdb_locks.cc
index 1ee15cb..00f655a 100644
--- a/storage/rocksdb/rdb_locks.cc
+++ b/storage/rocksdb/rdb_locks.cc
@@ -303,7 +303,8 @@ void LockTable::release_lock(LF_PINS *pins, Row_lock *own_lock)
     char *rowkey= own_lock->rowkey;
     own_lock->deleted= true;
     mysql_mutex_unlock(&own_lock->mutex);
-    int res= lf_hash_delete(&lf_hash, pins, own_lock->rowkey, own_lock->len);
+    int res __attribute__((unused));
+    res= lf_hash_delete(&lf_hash, pins, own_lock->rowkey, own_lock->len);
     DBUG_ASSERT(res == 0);
     my_free(rowkey);
   }


More information about the commits mailing list