Skip to content

Commit 2189df3

Browse files
committed
Fixed compiler warnings
1 parent 031e344 commit 2189df3

File tree

3 files changed

+9
-10
lines changed

3 files changed

+9
-10
lines changed

sql/sql_parse.cc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1122,15 +1122,14 @@ static enum enum_server_command fetch_command(THD *thd, char *packet)
11221122
{
11231123
enum enum_server_command
11241124
command= (enum enum_server_command) (uchar) packet[0];
1125-
NET *net= &thd->net;
11261125
DBUG_ENTER("fetch_command");
11271126

11281127
if (command >= COM_END ||
11291128
(command >= COM_MDB_GAP_BEG && command <= COM_MDB_GAP_END))
11301129
command= COM_END; // Wrong command
11311130

11321131
DBUG_PRINT("info",("Command on %s = %d (%s)",
1133-
vio_description(net->vio), command,
1132+
vio_description(thd->net.vio), command,
11341133
command_name[command].str));
11351134
DBUG_RETURN(command);
11361135
}

storage/innobase/lock/lock0lock.cc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6817,7 +6817,7 @@ lock_clust_rec_modify_check_and_lock(
68176817
lock_rec_convert_impl_to_expl(block, rec, index, offsets);
68186818

68196819
lock_mutex_enter();
6820-
trx_t* trx = thr_get_trx(thr);
6820+
trx_t* trx __attribute__((unused))= thr_get_trx(thr);
68216821

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

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

6880-
trx_t* trx = thr_get_trx(thr);
6880+
trx_t* trx __attribute__((unused))= thr_get_trx(thr);
68816881
lock_mutex_enter();
68826882

68836883
ut_ad(lock_table_has(trx, index->table, LOCK_IX));
@@ -6977,7 +6977,7 @@ lock_sec_rec_read_check_and_lock(
69776977
lock_rec_convert_impl_to_expl(block, rec, index, offsets);
69786978
}
69796979

6980-
trx_t* trx = thr_get_trx(thr);
6980+
trx_t* trx __attribute__((unused))= thr_get_trx(thr);
69816981
lock_mutex_enter();
69826982

69836983
ut_ad(mode != LOCK_X
@@ -7051,7 +7051,7 @@ lock_clust_rec_read_check_and_lock(
70517051
}
70527052

70537053
lock_mutex_enter();
7054-
trx_t* trx = thr_get_trx(thr);
7054+
trx_t* trx __attribute__((unused))= thr_get_trx(thr);
70557055

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

storage/xtradb/lock/lock0lock.cc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6890,7 +6890,7 @@ lock_clust_rec_modify_check_and_lock(
68906890
lock_rec_convert_impl_to_expl(block, rec, index, offsets);
68916891

68926892
lock_mutex_enter();
6893-
trx_t* trx = thr_get_trx(thr);
6893+
trx_t* trx __attribute__((unused))= thr_get_trx(thr);
68946894

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

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

6957-
trx_t* trx = thr_get_trx(thr);
6957+
trx_t* trx __attribute__((unused))= thr_get_trx(thr);
69586958
lock_mutex_enter();
69596959

69606960
ut_ad(lock_table_has(trx, index->table, LOCK_IX));
@@ -7063,7 +7063,7 @@ lock_sec_rec_read_check_and_lock(
70637063
lock_rec_convert_impl_to_expl(block, rec, index, offsets);
70647064
}
70657065

7066-
trx_t* trx = thr_get_trx(thr);
7066+
trx_t* trx __attribute__((unused))= thr_get_trx(thr);
70677067
lock_mutex_enter();
70687068

70697069
ut_ad(mode != LOCK_X
@@ -7146,7 +7146,7 @@ lock_clust_rec_read_check_and_lock(
71467146
}
71477147

71487148
lock_mutex_enter();
7149-
trx_t* trx = thr_get_trx(thr);
7149+
trx_t* trx __attribute__((unused))= thr_get_trx(thr);
71507150

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

0 commit comments

Comments
 (0)