Skip to content

Commit 72dc30f

Browse files
committed
Fixed compiler warnings
1 parent 2553f14 commit 72dc30f

File tree

5 files changed

+5
-7
lines changed

5 files changed

+5
-7
lines changed

sql-common/client.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -129,10 +129,6 @@ static void mysql_close_free(MYSQL *mysql);
129129
static void mysql_prune_stmt_list(MYSQL *mysql);
130130
static int cli_report_progress(MYSQL *mysql, char *packet, uint length);
131131

132-
#if !defined(__WIN__)
133-
static int wait_for_data(my_socket fd, uint timeout);
134-
#endif
135-
136132
CHARSET_INFO *default_client_charset_info = &my_charset_latin1;
137133

138134
/* Server error code and message */

sql/opt_range.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3557,9 +3557,9 @@ bool calculate_cond_selectivity_for_table(THD *thd, TABLE *table, Item *cond)
35573557
break;
35583558
bitmap_set_bit(&handled_columns, key_part->fieldnr-1);
35593559
}
3560-
double selectivity_mult;
35613560
if (i)
35623561
{
3562+
double UNINIT_VAR(selectivity_mult);
35633563
/*
35643564
There is at least 1-column prefix of columns whose selectivity has
35653565
not yet been accounted for.

sql/rpl_gtid.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ rpl_slave_state::check_duplicate_gtid(rpl_gtid *gtid, rpl_group_info *rgi)
122122
int res;
123123
bool did_enter_cond= false;
124124
PSI_stage_info old_stage;
125-
THD *thd;
125+
THD *UNINIT_VAR(thd);
126126
Relay_log_info *rli= rgi->rli;
127127

128128
mysql_mutex_lock(&LOCK_slave_state);

sql/sql_select.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23479,7 +23479,7 @@ int JOIN::save_explain_data_intern(Explain_query *output, bool need_tmp_table,
2347923479
bool need_order, bool distinct,
2348023480
const char *message)
2348123481
{
23482-
Explain_node *explain_node;
23482+
Explain_node *UNINIT_VAR(explain_node);
2348323483
JOIN *join= this; /* Legacy: this code used to be a non-member function */
2348423484
THD *thd=join->thd;
2348523485
const CHARSET_INFO *cs= system_charset_info;

storage/tokudb/ha_tokudb.cc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,7 @@ static inline uint32_t get_len_of_offsets(KEY_AND_COL_INFO* kc_info, TABLE_SHARE
172172
}
173173

174174

175+
#ifdef NOT_USED
175176
static int get_thread_query_string(my_thread_id id, String &qs) {
176177
mysql_mutex_lock(&LOCK_thread_count);
177178
I_List_iterator<THD> it(threads);
@@ -196,6 +197,7 @@ static int get_thread_query_string(my_thread_id id, String &qs) {
196197
mysql_mutex_unlock(&LOCK_thread_count);
197198
return 0;
198199
}
200+
#endif
199201

200202
static int allocate_key_and_col_info ( TABLE_SHARE* table_share, KEY_AND_COL_INFO* kc_info) {
201203
int error;

0 commit comments

Comments
 (0)