Skip to content

Commit

Permalink
Fixed compiler warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
montywi committed Apr 7, 2016
1 parent 031e344 commit 2189df3
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 10 deletions.
3 changes: 1 addition & 2 deletions sql/sql_parse.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1122,15 +1122,14 @@ static enum enum_server_command fetch_command(THD *thd, char *packet)
{
enum enum_server_command
command= (enum enum_server_command) (uchar) packet[0];
NET *net= &thd->net;
DBUG_ENTER("fetch_command");

if (command >= COM_END ||
(command >= COM_MDB_GAP_BEG && command <= COM_MDB_GAP_END))
command= COM_END; // Wrong command

DBUG_PRINT("info",("Command on %s = %d (%s)",
vio_description(net->vio), command,
vio_description(thd->net.vio), command,
command_name[command].str));
DBUG_RETURN(command);
}
Expand Down
8 changes: 4 additions & 4 deletions storage/innobase/lock/lock0lock.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6817,7 +6817,7 @@ lock_clust_rec_modify_check_and_lock(
lock_rec_convert_impl_to_expl(block, rec, index, offsets);

lock_mutex_enter();
trx_t* trx = thr_get_trx(thr);
trx_t* trx __attribute__((unused))= thr_get_trx(thr);

ut_ad(lock_table_has(trx, index->table, LOCK_IX));

Expand Down Expand Up @@ -6877,7 +6877,7 @@ lock_sec_rec_modify_check_and_lock(
index record, and this would not have been possible if another active
transaction had modified this secondary index record. */

trx_t* trx = thr_get_trx(thr);
trx_t* trx __attribute__((unused))= thr_get_trx(thr);
lock_mutex_enter();

ut_ad(lock_table_has(trx, index->table, LOCK_IX));
Expand Down Expand Up @@ -6977,7 +6977,7 @@ lock_sec_rec_read_check_and_lock(
lock_rec_convert_impl_to_expl(block, rec, index, offsets);
}

trx_t* trx = thr_get_trx(thr);
trx_t* trx __attribute__((unused))= thr_get_trx(thr);
lock_mutex_enter();

ut_ad(mode != LOCK_X
Expand Down Expand Up @@ -7051,7 +7051,7 @@ lock_clust_rec_read_check_and_lock(
}

lock_mutex_enter();
trx_t* trx = thr_get_trx(thr);
trx_t* trx __attribute__((unused))= thr_get_trx(thr);

ut_ad(mode != LOCK_X
|| lock_table_has(trx, index->table, LOCK_IX));
Expand Down
8 changes: 4 additions & 4 deletions storage/xtradb/lock/lock0lock.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6890,7 +6890,7 @@ lock_clust_rec_modify_check_and_lock(
lock_rec_convert_impl_to_expl(block, rec, index, offsets);

lock_mutex_enter();
trx_t* trx = thr_get_trx(thr);
trx_t* trx __attribute__((unused))= thr_get_trx(thr);

ut_ad(lock_table_has(trx, index->table, LOCK_IX));

Expand Down Expand Up @@ -6954,7 +6954,7 @@ lock_sec_rec_modify_check_and_lock(
index record, and this would not have been possible if another active
transaction had modified this secondary index record. */

trx_t* trx = thr_get_trx(thr);
trx_t* trx __attribute__((unused))= thr_get_trx(thr);
lock_mutex_enter();

ut_ad(lock_table_has(trx, index->table, LOCK_IX));
Expand Down Expand Up @@ -7063,7 +7063,7 @@ lock_sec_rec_read_check_and_lock(
lock_rec_convert_impl_to_expl(block, rec, index, offsets);
}

trx_t* trx = thr_get_trx(thr);
trx_t* trx __attribute__((unused))= thr_get_trx(thr);
lock_mutex_enter();

ut_ad(mode != LOCK_X
Expand Down Expand Up @@ -7146,7 +7146,7 @@ lock_clust_rec_read_check_and_lock(
}

lock_mutex_enter();
trx_t* trx = thr_get_trx(thr);
trx_t* trx __attribute__((unused))= thr_get_trx(thr);

ut_ad(mode != LOCK_X
|| lock_table_has(trx, index->table, LOCK_IX));
Expand Down

0 comments on commit 2189df3

Please sign in to comment.